hello lavanya ur program will give an output just try and hey vladimir program must give an exception ArrayIndexoutOfBound ur program is all right it shows output but leave first element output:bcdef
hello murali listen it is the rule of overriding when u override a method u can not use those specifiers due to which weeker access done i mean if u will use private in superclass and then override the method with public then it will not give an error because access is stronger u can understant in the way of upcasting and downcasting
hello there please send the link for exception i mean those who are related with constructor like these problems public class Test9 extends A { Test9() throws Exception() { } public static void main(String args[]) throws Exception{ Test9 t = new Test9(); } } class A{ A() throws Exception{ System.out.println("A Class"); } }
i am Krish Bajaj . and i suggest u to give scjp 1.4 first after move further for scjp 1.5 by scjp 1.4 you understand the basic concepts closely i am going to write my exam on 28 june for scjp 1.4 have a nice time Thanks Krish
class A{ A() { System.out.println("A Class"); } } public class Test10 extends A{ Test10(){ System.out.println("Test10 Class"); } public static void main(String args[]) { Test10 t = new Test10(); } }
output: A Class Test10 Class how is this output comes explain it