What are the differences between java’s old java date api and java 8’s date and time api?
No Answer is Posted For this Question
Be the First to Post Answer
Why struts framework is used in java?
What is java lang?
What are anonymous methods and lambda expression?
What is jpa used for?
i have make jar file but when i click in this file then arr swhow "no faund main class" plese help me in this problem becose i want to make a jar file as a dxdcutable file
Describe the principles of oops.
Can I have multiple main methods in the same class?
What is the difference between a while statement and a do statement?
What is proxy object in java?
What is java aop?
How do you find lambda?
public class Dog { private int weight; public int getweight(){ return weight; } public void SetWeight(int newWeight){ if (newWeight > 0){ weight = newWeight; } } } public class TestDog { public static void main(String[] args) { Dog d = new Dog(); System.out.println("Dog d's weight is " + d.getWeight()); d.setWeight(42); System.out.println("Dog d's weight is " + d.getWeight()); d.setweight(-42); System.out.println("Dog d's weight is " + d.getWeight()); } } class dog is compiled but there is an error in class TestDog when compiled and the error is with dot notations. I want to kmow why there is error in testdog class when compiled.