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
1804public 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 6963suppose 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 4395Post New Java Related AllOther Questions
What does el mean in java?
What is gpt and gpc? : java security
What is jep in java?
differences between iterator and spliterator in java se 8?
Can we extract main method from another class?
What is loose coupling in java?
What is jboss in java?
Which class is the superclass of every class?
Why doesn’t the main method throw an error with no arguments?
there are 67 seats in train . there are only 5 seats in a row and in last row there are only 2 seats. One person can reseve only 5 seat at a time. If person reserving seat , the care is atken that he may get all in row. if seats are not available in row then the arrangement is so that person group get nearby seats. the following class is given public class seat { char name; int seat; boolean isSeatempty } 1.Draw require class digram and object diagram. 2.Write function seatallot(int noofperson) to allocate seat with seat nuber printed for the each name.
Explain the common use of ejb?
Is java a framework?
How do I enable java in google chrome?
How many types of jdk are there?
How do I install java re?