Does jvm maintain a cache by itself? Does the jvm allocate objects in heap? Is this the os heap or the heap maintained by the jvm? Why
No Answer is Posted For this Question
Be the First to Post Answer
Can I have multiple main methods in the same class?
When a thread is created and started, what is its initial state?
i have client interview in TCS.client is CITI BANK.how to face it,what type of questions they will ask,please tell send me to kumar525job@gmail.com
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.
What is dialect in java?
What is java persistence api used for?
What are the advantages of lambda functions?
What is the meaning of the words public, static and void?
1.can i use super keyword in normal class(not inheritance) to call any method?if so how can i call particular variable? 2.In the inheritance how can i access the particular variable from the base class(it containing 5 variables) using super keyword?
What is the difference between Logical Parallelism and Physical Parallelism?
What is cloning in java?
What are the advantages of java sockets?