Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search Coderanch
Advance search
Google search
Register / Login
mo shaik
Greenhorn
+ Follow
23
Posts
10
Threads
0
Cows
since Jul 17, 2007
Merit badge:
grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
Ranch Hand Scavenger Hunt
Number Posts (23/100)
Number Threads Started (10/100)
Number Cows Received (0/5)
Number Likes Received (0/10)
Number Likes Granted (0/20)
Set bumper stickers in profile (0/3)
Report a post to the moderators (0/1)
Edit a wiki page (0/1)
Create a post with an image (0/2)
Greenhorn Scavenger Hunt
First Post
Number Posts (23/10)
Number Threads Started (10/10)
Number Likes Received (0/3)
Number Likes Granted (0/3)
Set bumper stickers in profile (0/1)
Set signature in profile
Search for a post/thread (0/3)
Set a watch on a thread
Save thread as a bookmark
Create a post with an image (0/1)
Recent posts by mo shaik
myExam
hai everybody my exam is on thursday any advise from people who appeared scjp1.5 would be great. thanks
show more
15 years ago
Programmer Certification (OCPJP)
same with super
hai can anybody explain me why iam getting same output with the super. the first statemet after call to super should be parent class constructor is it not. class Parent { int a = getA(); { System.out.println("Parent Class Instance Initializer"); } public Parent() { System.out.println("Parent Class Constructor"); } private int getA() { System.out.println("Parent Class Member Initializer"); return 0; } } public class Child extends Parent { { System.out.println("Child Class Instance Initializer"); } int b = getB(); public Child() { System.out.println("Child Class Constructor"); } private int getB() { System.out.println("Child Class Member Initializer"); return 0; } public static void main(String[] args) { Child c = new Child(); System.out.println("Done"); } } A. Output is: Child Class Constructor Parent Class Constructor Parent Class Member Initializer Parent Class Instance Initializer Child Class Member Initializer Child Class Instance Initializer Done B. Output is: Parent Class Member Initializer Parent Class Instance Initializer Parent Class Constructor Child Class Instance Initializer Child Class Member Initializer Child Class Constructor Done C. Output is: Parent Class Member Initializer Parent Class Instance Initializer Parent Class Constructor Child Class Member Initializer Child Class Instance Initializer Child Class Constructor Done D. Output is: Parent Class Constructor Parent Class Member Initializer Parent Class Instance Initializer Child Class Constructor Child Class Instance Initializer Child Class Member Initializer Done class Parent { int a = getA(); { System.out.println("Parent Class Instance Initializer"); } public Parent() { System.out.println("Parent Class Constructor"); } private int getA() { System.out.println("Parent Class Member Initializer"); return 0; } } public class Child extends Parent { { System.out.println("Child Class Instance Initializer"); } int b = getB(); public Child() { System.out.println("Child Class Constructor"); } private int getB() { System.out.println("Child Class Member Initializer"); return 0; } public static void main(String[] args) { Child c = new Child(); System.out.println("Done"); } } A. Output is: Child Class Constructor Parent Class Constructor Parent Class Member Initializer Parent Class Instance Initializer Child Class Member Initializer Child Class Instance Initializer Done B. Output is: Parent Class Member Initializer Parent Class Instance Initializer Parent Class Constructor Child Class Instance Initializer Child Class Member Initializer Child Class Constructor Done C. Output is: Parent Class Member Initializer Parent Class Instance Initializer Parent Class Constructor Child Class Member Initializer Child Class Instance Initializer Child Class Constructor Done D. Output is: Parent Class Constructor Parent Class Member Initializer Parent Class Instance Initializer Child Class Constructor Child Class Instance Initializer Child Class Member Initializer Done Answer is B
show more
15 years ago
Programmer Certification (OCPJP)
same wiht super
hai can anybody explain me why iam getting same output with the super. the first statemet after call to super should be parent class constructor is it not. class Parent { int a = getA(); { System.out.println("Parent Class Instance Initializer"); } public Parent() { System.out.println("Parent Class Constructor"); } private int getA() { System.out.println("Parent Class Member Initializer"); return 0; } } public class Child extends Parent { { System.out.println("Child Class Instance Initializer"); } int b = getB(); public Child() { System.out.println("Child Class Constructor"); } private int getB() { System.out.println("Child Class Member Initializer"); return 0; } public static void main(String[] args) { Child c = new Child(); System.out.println("Done"); } } A. Output is: Child Class Constructor Parent Class Constructor Parent Class Member Initializer Parent Class Instance Initializer Child Class Member Initializer Child Class Instance Initializer Done B. Output is: Parent Class Member Initializer Parent Class Instance Initializer Parent Class Constructor Child Class Instance Initializer Child Class Member Initializer Child Class Constructor Done C. Output is: Parent Class Member Initializer Parent Class Instance Initializer Parent Class Constructor Child Class Member Initializer Child Class Instance Initializer Child Class Constructor Done D. Output is: Parent Class Constructor Parent Class Member Initializer Parent Class Instance Initializer Child Class Constructor Child Class Instance Initializer Child Class Member Initializer Done class Parent { int a = getA(); { System.out.println("Parent Class Instance Initializer"); } public Parent() { System.out.println("Parent Class Constructor"); } private int getA() { System.out.println("Parent Class Member Initializer"); return 0; } } public class Child extends Parent { { System.out.println("Child Class Instance Initializer"); } int b = getB(); public Child() { System.out.println("Child Class Constructor"); } private int getB() { System.out.println("Child Class Member Initializer"); return 0; } public static void main(String[] args) { Child c = new Child(); System.out.println("Done"); } } A. Output is: Child Class Constructor Parent Class Constructor Parent Class Member Initializer Parent Class Instance Initializer Child Class Member Initializer Child Class Instance Initializer Done B. Output is: Parent Class Member Initializer Parent Class Instance Initializer Parent Class Constructor Child Class Instance Initializer Child Class Member Initializer Child Class Constructor Done C. Output is: Parent Class Member Initializer Parent Class Instance Initializer Parent Class Constructor Child Class Member Initializer Child Class Instance Initializer Child Class Constructor Done D. Output is: Parent Class Constructor Parent Class Member Initializer Parent Class Instance Initializer Child Class Constructor Child Class Instance Initializer Child Class Member Initializer Done Answer is B
show more
15 years ago
Programmer Certification (OCPJP)
stack and heap
thank u subodh.
show more
15 years ago
Programmer Certification (OCPJP)
stack and heap
hai, instance var live on the heap. local var live on the stack. does it mean heap lives longer than stack. i dont know what exactly heap and stack means all i know is they are memory parts. please explain
show more
15 years ago
Programmer Certification (OCPJP)
Generics ....
hai kahtir, <?> =< ? extends Object> because of that it will compile. check once again thanks
show more
15 years ago
Programmer Certification (OCPJP)
PriorityQueue
thanks nitin
show more
15 years ago
Programmer Certification (OCPJP)
PriorityQueue
can anybody explain me this code String [] sa= { ">ff<", "> f<", ">f<" ">FF<"}; PriorityQueue <String> pq = new PriorityQueue<String>(); for(String s:sa) pq.offer(s); for (String s: sa) System.out.println(pq.poll()+" "); o/p= > f< >FF< >f< >ff< thank u.
show more
15 years ago
Programmer Certification (OCPJP)
PriorityQueue
hai can anybody explain peek(), poll(), offer() methods thank u
show more
15 years ago
Programmer Certification (OCPJP)
Doubt in For loop
hello seema, i your code what u r doing is 1) i =0 initially u assigned to 1 in for loop which prints 12 to the condition then it exists now the static var i=3 2) now i =0 this is not global var i is local to the for loop then again it prints to the condit 3)now again i=0 this is also local which prints the condition. 4)u r asking to print the value of class global var which i=3. i think this is clear thank u
show more
15 years ago
Programmer Certification (OCPJP)
Doubt in overrididng
hai deepak, i think u got it wrong static methods can be inherited by subclass. please checkit out. thank u
show more
15 years ago
Programmer Certification (OCPJP)
preparing for scjp 5.0
hai aneena, sorry to tell u that once u are typing caps JSP and in other program you typed small jsp that make the output change sequence. The collection u used tree is sorted in natural order so caps come first and so on... thanks
show more
15 years ago
Programmer Certification (OCPJP)
whizlabs
i did ask not because it wil take equal money. i dont have a credit card to buy it. The card i have wont pay in foreign currency. thank u please provide any other way
show more
15 years ago
Programmer Certification (OCPJP)
whizlabs
can anybody tell me who brought wihzlabs preparation kit in india about how to buy.
because it is not accepting indian ruppees.
show more
15 years ago
Programmer Certification (OCPJP)
scjp1.5 on 2nd
hai vassili, i did read k&b 3 times and did some exams of 1.4 and k&b cd exams thank u any more
show more
15 years ago
Programmer Certification (OCPJP)