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
1411public 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 5975suppose 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 3440Post New Java Related AllOther Questions
How can you work with permissions from your .net application? : java security
Is openjdk the same as jdk?
What is the means of java?
How do I download and install eclipse on windows 10?
Can we extract main method from another class?
What is jndi datasource in java?
What is tight coupling in java?
What is the java api?
Explain suspend() method under thread class>
What is tuple2?
Is lambda functional programming?
Is jdk an ide?
Why do we need framework 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.
What if I do not provide the string array as the argument to the method?