Java does not support multiple inheritance because it leads to confusion to the programmer. It is prove in the following ex.
Class A { int x; } Class B { int x; } Class c extends A,B { x=10;// Java compiler does not //know whether it is x of class A //or x of class B. } in java Class C extends A,B Multiple inheritance is achieved by using single inheritence.
ex; Class A { int a; } class B extends A { int b; } class C extends B { a=10; b=20; } we can pass add of an obj as follows Class A { A(int add) { int address=add; System.out.println("Address="+add);
} } Class Addr { public static void main(String args[]) { A add=new A(add); } }
1)What are the actual functions of JVM? 2)When to use a class and when to use an Abstract class? 3)what is the use of constructors other than creation of objects? 4)when to use constructors? 5)when to use Interface? 6)why java does not support pointers? 7)why multiple inheritance is not possible in java without using Interfaces?
While developing one in JSP page we are sending request to Struts frame work.If we click two times submit button then First time only it should accept request and second time should reject that request in struts frame work.
How we can do that in controller itself...I am waiting for your Response...