praveena kuppachi

Greenhorn
+ Follow
since Jan 24, 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 praveena kuppachi

Yes,I got it!
Thanks.
Hi can anyone explain this?
For the code given below answer is D.
I am confused!
contents of stringBuffer are mutable.In that case
in line 10 b is assigned the value of a so it should be one more,how come it is two?
Thanks.
public class Test {//line1
public static void main(String args[]) {//line2
StringBuffer a = new StringBuffer("One");//line3
StringBuffer b = new StringBuffer("Two");//line4
Test.swap(a,b);//line5
System.out.println("a is "+ a +"\nb is " + b);//line5
}//line7
static void swap (StringBuffer a, StringBuffer b) {//line8
a.append(" more");//line9
b=a;//line10
}
}
What will be the output?
Answer:
a. a is One
b is Two
b. a is One
b is One
c. a is One more
b is One more
d. a is One more
b is Two
e. a is One more
b is Two more
Does The exam for java 1.4 certification consist of short answer questions?If so,what is the pattern?
Thanks.
hi,
I tried executing the same program on my machine.it generated a compilation error saying:
Cant make forward reference to s in class initialization.
as quoted in java2 certification study guide from SIMON ROBERTS:

SUBCLASSING A THREAD HAS AN EFFECT OF SAYING THAT:
"THIS 'IS A' THREAD.
USING RUNNABLE INTERFACE SAYS "THE CLASS IS ASSOCIATED WITH A THREAD "
HOPE THIS WOULD BE CLEAR.
Threads can be created in two ways.
1.Either by extending "thread" or
2.Implementing Runnable interface.
However,the best alternative is to go for option 2.
Because,in case of option 1(subclassing thread),if a thread needs to extend any additional classes,it is not possible as java does not support Multiple Inheritance.And u know that interface is a replacement for multiple inheritance.This is one primary reason.
hi
can anyone help me understand the importance of strictfp ! Is it a access modifier?If so,what members of a class are allowed to have it
I came across this while scanning some of the topics in JLS.
I did not understand clearly.
Thanks.
Hi
A method or a variable that is declared private i s not accesible outside the class.Thats is only the members belonging to the class can acces it.it can be used by the instance of the class that declares it
Thanks a lot.
That relieves me a lot!
I will follow your suggestion.
Hi,Iam planning to go for scjp exam.as u all know sun offers two exams,one java1.2 and the other is java1.4
Iam not in a position to make a decision whether to go for java1.2 or java1.4
Is there any major difference in them apart from course contents?
Thanks.Your suggestion would be highly appreciated.
The JVM categorizes Threads into two groups :
user and daemon.
when initially created threads are user threads,but before they are started they may be tagged as daemon threads by the setDaemon method.This tag becomes important when the JVM tries to decide when to shut down a program .
Every time a thread dies,The JVM looks at the remaining threads to see whether any of them is a user thread.If only daemon threads are left,the JVM terminates.
Hope Iam clear.
hi,
we need to make a point that,the difference between a method and a constructor is that method has a return type.if it does not return anything it is preceeded by "void."
But a constructor on the other hand does not have any return type not even void.
I think a class can have a same name as that of its package,but it may lack readability.
lets say theres a class called blah1 placed in a package called blah1.then any class using the contents of blah1 looks like this:
import blah1.blah1;