How to reverse the singly linked list(In Node data members
are(int data,int pointerTONext))
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 interceptors in java?
how can program polindrome using java
What is the difference between Enumeration and Iteration interfaces? What is the way of to retreive the objects from these interfaces ?
What is meant by annotations in java?
what are the steps in JDBC connectivity..???
Please can anybody explain what exactly "the project architecture" means???
What is data persistence in java?
Can a method be static and synchronized?
Who is at risk in java? : java security
What are the advantages of lambda functions?
What is meant by pass by reference and pass by value in java?