Why do we only use the main method to start a program?
No Answer is Posted For this Question
Be the First to Post Answer
why is java not 100% oops?
What are the risks in java security? : java security
What about 'hostile applets'? : java security
What java systems libraries and methods are available for me to use?
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.
In which language eclipse is developed?
What is a bean class?
how can we create the ui using netbeans,having the code?
What is the difference between a jvm and a jdk?
What is aop in java?
What are jdk tools?
why java has the size of character 2 byte ,while in c/c++ it is of 1 byte?