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
1917public 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 7245suppose 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 4614Post New Java Related AllOther Questions
explain isalive() method under thread class?
Explain main thread under thread class execution?
What is meant by swing in java?
How do I install java re?
What is @qualifier in java?
Write a program using call by refernce for two different classes to explain to print whether a given number is automorphic or not.
How can you work with permissions from your .net application? : java security
What is difference between loosely coupled and tightly coupled in java?
What is aop in java?
Why do we create dto in java?
What is the use of entity class in java?
Is eclipse a jdk?
What is scrollable resultset in java?
What is singleton pattern in java?
What is lambda used for?