Why do we need framework in java?
No Answer is Posted For this Question
Be the First to Post Answer
What is meant by pass by reference and pass by value in java?
What is proxy object in java?
What are the differences between java’s old java date api and java 8’s date and time api?
What is a java singleton?
What is lambda value?
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.
Can the main method be declared final?
Which version of jdk is required for netbeans 8.0 2?
What is a static method?
Can you compile java into exe?
Define network programming?
In which language eclipse is developed?