What is meant by pass by reference and pass by value in java?
No Answer is Posted For this Question
Be the First to Post Answer
What is class forname java?
What happens when the parent process of a child process exits before the child ?
How do I create an executable jar file?
What is tuple2?
What is a java singleton?
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 should I format my code? How should I comment my code?
What does persist mean in java?
What is jpa used for?
What is csrf in java?
Is java installed on windows 10?
What is the use of entity class in java?