when i send the request to the JSP page it will print as it is and why? and how to solve this problem please inform me that solution
1868public 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.
3 7131suppose we have one String s="india is my country"; now we get the o/p "like country my is India". what is the logic?
2 4521Post New Java Related AllOther Questions
What is meant by framework in java?
What is log4j in java?
What is a java proxy?
What is jndi datasource in java?
Why dependency injection is used in java?
Which interceptor is responsible for setting action javabean properties?
What is a jpa repository?
How can I protect myself? : java security
How do I open my java console?
What is a jvm?
Where is singleton design pattern used in java?
What is singleton pattern in java?
What is tight coupling in java?
What is meant by annotation in java?
Is php faster than java?