Mani

Ranch Hand
+ Follow
since Apr 20, 2000
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 Mani

AK,
When we call equals for StringBuffer, since equals() is not overridden in String Buffer the actual method which is used is the equal() in Object class.equals() in Object behaves similar to the == comparison ie whether the objects are same or not.
Since you are assigning c=d both references are same. So this gives true.
Thanks to all of you.
Regrading IO in real exam they will ask only direct questions I think.(say something related with constructor types or which type streams a particular stream supports as arguments.)
In thread I think you have to study the conditions at which thread stops ,significance of various methods(run,yield etc)
and synchronization concepts.
Real exam is very easy. Some qns were so easy that I have to confirm it by reading it again.
All the best
Mani
Hi All,
Today I passed SCJP with 86%. Thanks to all of you.Java Ranch has been really helpful in preparing for the exam.
The exam was really very easy.It was almost similar to Marcus exams. I finished the exam in 1 hr 15 mts.45 mints I spent for reviewing. There was one question relating to Stack not actually a Collection qn.(Related with Overloading or something(sure it was wrong for me).
For Certification I bought the following books.
Certification guide by Barry Boone and William Stanek(Don't buy this one)
Certification guide by Jamie Jaworski.
Believe it or not I didn't read the book commonly named "THE BIBLE" for Certification - Roberts & Hellers guide.
For the past one month I was reading postings in this forum.
Full credit of my success goes to Java Ranch.
Thanks to all of you.

Congrats Nalini,
All the best for a great future.
AWT
An example you can find in Tony Alicea's home page.
I don't have the URL with me.
Congrats Maha,
We would like to know how you prepared for the exam.What books you read, and list of mock exams you took before the real one and how much you scored in that etc.. .I think this may help those who haven't certified yet. One more thing are you working some were??
Regards
Mani
Bongadi,
I dont agree with you. In your program you are not creating reference to the interface. Actual reference stored is that of aClass object.
Yes Ajith you were right. I thought the C++ way.
Thanks
This qn is from Marcus 3
Which of the following statements are true?
1) The default constructor has a return type of void
2) The default constructor takes a parameter of void
3) The default constructor takes no parameters
4) The default constructor is not created if the class has any constructors of its own.
Choice 2 and 3 says the same thing right??
answer given is 3,4
So what will be the answer if it is asked in actual exam??
Marcus no:7
Which of the following statements are true?
1) An interface can only contain method and not variables
2) Java does not allow the creation of a reference to an interface with the new keyword.
3) A class may extend only one other class and implement only one interface
4) Interfaces are the Java approach to addressing its single inheritance model, but require implementing classes to create the functionality of the Interfaces.
Ans given is 4)
I think choice 2 is also correct.
Java won't allow creation of the reference of an interface with new keyword. Actually if we do so we won't get the reference to the interface but will get reference to an anonymous inner class which implements the interface. Correct me if I am wrong.
RGDs
Manoj
I think I have to study little bit of English Grammer also for the Sun Certification Exam.

The code itself clarifies your doubt.
Panel has default layout FlowLayout.
Frame's default Layout is BorderLayout.
You have changed the default Layout to the user specified Layout using
setLayout(new FlowLayout());
Now the Frame has Flow Layout property.
In FrameLayout we don't have to mention the position where the component has to be placed.It will handle the positioning itself.
Thats why you see the panel on the top of the frame.
See this thread
http://www.javaranch.com/ubb/Forum24/HTML/000734.html
I think you will get an answer in this.
This one is from JTest
Which statement is true about a non-static inner class?
A. It must implement an interface.
B. It is accessible from any other class.
C. It can only be instantiated in the enclosing class.
D. It must be final if it is declared in a method scope.
E. It can access private instance variables in the
enclosing object.
Ans given is E.
My ans B,D,E
I think B is partially true.
inner class can be accessed from outer class if it is not declared private.(and ofcourse we have to create the instance of enclosing class).
c)inner class inside method scope is implicitly final
We cannot subclass an inner class declared inside a method scope.
Please correct me if I am wrong.
interface a
{
}
interface b
{
}
interface c extends a,b
{
}
public class temp
{
public static void main(String args[])
{
System.out.println("test message");
}

}
See interface c.Can we say this is multiple inheritance??