What is the difference between lambdas and delegates?
No Answer is Posted For this Question
Be the First to Post Answer
What is jboss in java?
What are the advantages of java 8’s date and time api over old date api and joda time api?
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
What is dao in java?
What is savepoint in java?
What is war file in java?
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.
How do I run a project in netbeans?
What is aop java?
What is java bean class?
Why do we only use the main method to start a program?
Why there are no global variables in java?