Win a copy of Spring Boot in Practice this week in the Spring forum!

veena devi

Greenhorn
+ Follow
since Aug 25, 2003
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
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by veena devi

Congrats Sree,
All the best for future.
veena
hi,
thanx all
maha, it is infact in a seperate thread here. http://www.javaranch.com/ubb/Forum24/HTML/001030.html
regds,
veena
a list of mock exams are available at this url http://javaranch.com/mock.html
hi, Tony
when i decided for scjp2, i find this site .that time i was very much impressed with your score. i have taken some tips from your posts.now i cleared scjp2 with 97%.thanks a lot .
veena
thanks maha and shiva
maha, i always appreciate and wait for your ans for any q
in this forum.visiting this site is fun and gain both.
i visit this site almost daily.it is very helpful for any of the java topics.thanks again.
shiva,there were not any tricky or ambiguous questions in actual exam.that type of questions are more in mock exams but mock exams are very helpful in preparation . fundamental concepts of language should be very clear.one qs was related to gridbag layout regarding the function of fields.
thanks.
congrats, suchitra
wish you success in everything you do
veena
for variables,private and static methods there is no dynamic binding.while executing the statement for access of variables private method and static methods, only type of reference is checked not the object that reference variable points to.
hi all
i cleared scjp2 yesterday.thanks to jim,maha and tony for maintaining a interesting and very helpful site for all the topics related to java,specially this forum.list of mock exams is very useful.marcus green site is also very helpful,his tutorial is very good for revision.questions in actual exam were simpler than mock exams.but mock exams help in knowing the topics which need improvement
thanks again
veena
for the firs iteration of for loop i is 0 .so control goes to inner try block evaluates the statement
if(i%3 == 0) this evaluates to true and throws the exception
so control goes to immediate try block and evaluate
i *= 2; and if(i%3 == 0) here also it evaluates to true and throws exception.when exception is thrown it will search for catch in outer try block but before the control leaves the inner try it execute the finally block and evaluates i++ so i is 1 now.
after evaluating i += 3; in catch block i is 4 and then execute finally where i becomes 3 .now control goes to i++ part of for
loop so now i is 4 and if(i%3 == 0) returns false and print 4.
Its going too long.

Correct answer is d.
D.It changes the implementation without changing the interface and causes no consequential changes to other code
because encapsulation is meant for hiding your implementation
(code inside your method).your classes are used only through the interfaces(methods name) you provide.so you can change the code inside your method without actually affecting the interface

making a class final is related to another feature of oops called inheritance
hi
when you are using == operator for primitive data types binary numeric promotion is applied to non boolean operands,so in second if both operands are promoted to long and represent same primitive value and condition is true.
arrays are always initialized with default values when it is created whether it is defined locally or in class
thanks,got it from errata.
It is not required to include RuntimeException in the throws list
of a function definition.Is it illegal?
import java.io.*;
class Super
{
int methodOne( int a, long b ) throws IOException
{//some code
}
float methodTwo( char a, int b )
{//some code
}
}
public class Sub extends Super
{
}
Which of the following are legal method declarations to add to the class Sub? Assume that each method is the only one being added.
a) public static void main( String args[] ){}
b) float methodTwo(){}
c) long methodOne( int c, long d ){}
d) int methodOne( int c, long d ) throws ArithmeticException{}
e) int methodOne( int c, long d ) throws FileNotFoundException{}
this q is from one of the mock exams.correct answers given are a,b and e not d.
thanks to Jim and Manju