Win a copy of Head First Android this week in the Android forum!

Gaurav Goyal

+ Follow
since Jul 04, 2001
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Gaurav Goyal

friends I want ur kind suggestion plz
plz give ur advice on which book to prepare.
I have RHE (done it thoroughly)
gone through JLS
done quite a lot mock exams
generally get a score of around 80%
also done sufficient coding in java
but I have heard that real exam has a lot tough questions than mock exams. someone has suggested me khalid mughal. he says its has question more harder than real exam. doing that will make me confident. but I have also heard that its language is tough, and it covers some unneccessory topics not in scjp ans its a very lengthy book. what do u suggest me.
plz give ur suggestion
How many String objects are created when the following class is run?
public class TestClass
public static void main(String args[])
String hello = "Hello"; //1
String world = new String("World!"); //2
String helloworld = hello +" "+world; //3
String alias = helloworld; //4
System.out.println(alias); //5
well I think its 5
1 at line 1
2 at line 2
2 at line 3
what do u say?
thnks friends
I have a few more doubts
1) do each and every question says how many r correct answers in it or some also says select all correct answers
2) I have heard that the scjp certificate wont tell the percentage scored by us , then I feel it does not make any difference if u score 72% or 82%
plz help me
thanks in advance
20 years ago
ok friends , I got ur point
but could u please provide the sequence of execution like
first static var init
second constructor header executes
then the constructor
it would be help ful for me
hi Cameron Park
could u plz provide an explanation fot it
I think it would be 10.
as there r 10 string object created.
then which one is the 11th
Hello friends,
I want a suggestion form u people. I have to give my scjp and I am doing a lot of practice of mock exams. I generally get a score of 80% up in thoses mock exams. but I have also heard that real scjp is lot more tough. so , do u people suggest me to appear for it now. I want to clear it before 20th july.
could u people suggest me a good online mock exam , which is of the same test level as that of scjp.
help me plz.
also plz give ur advice on which areas should be well prepared. if u could remember, plx tell me approx no of question in each section. I would be very thankful to u. I sincerely want u advice.
plz do it fast
20 years ago
What is the output of the following program
public class Test {
private int i = giveMeJ();
private int j = 10;

private int giveMeJ() {
return j;

public static void main(String args[]) {
System.out.println((new Test()).i);
Select one correct answer
OPT:a. Compiler error complaining about access restriction of private variables of AQuestion.
OPT:b. Compiler error complaining about forward referencing.
OPT:c. No Compilation error - The output is 0;
OPT:d. No Compilation error - The output is 10;
ANS:c, I think the answer should be d, but the compiler also supports c, plz help me
Here is a method which creates a number of String objects in the course of printing a count down sequence.
public void countDown() {
for( int i = 10 ; i >= 0 ; i-- ){
String tmp = Integer.toString( i );
System.out.println( tmp );
When the program reaches line 6, how many of the String objects created in line 3 are eligible for garbage collection? Assume that the System.out object is not keeping a reference.
OPT:a. none
OPT:b. 1
OPT:c. 10
OPT:d. 11
Hi Thomas Paul
the question says " method which is invoked" , that means user is not invoking it , the method is invoked by the jvm. and I think jvm always call paint() rather than repaint(). repaint() is generally used in user codes
what do u say

if a compiled class is executed with the following option:
java -cs AClass a b c
Which statement is true?

B.args[1]="a b c";
Ans = d
could u people plz explain what is this option, and how is it effecting the result
An AWT GUI under exposure condition,which one or more method will be invok when it redraw?

Ans = c
well , I think its paint(), could someone plz provide explanation regarding it. thanks in advance
the answer seems to be wrong
if a classes should not be duplicated, ordered, and no special
search facility which of the following will u use.
answer = d, but I think it should be b.
list is ordered, rejected
map dont allow duplicates but search is fast, rejected
collection is not a class, rejected
left out is set
Thanks for ur responses friends
Do u think these kinds of certificates would help in getting admissions or scholarships in universities to do Masters in computer science in USA
I would like to know ur comments about this.
hello friends,
sometimes I doubt, whether my choice of giving scjp is correct or not. there r a lot of people with lots of such certificate and still searching for good jobs. then what is the use? ( dont take me wrong please)
well I am not strongly opposing it, but well I am not able to decide how will it help me getting a job. I'm just a fresh computer engineering graduate, and have done a lot of projects in java. will this scjp also help in higher studies in usa.
I would be greatful to u, have any of u also went through the same phase that I am passing, plz help me.
can we specify that the applet class should be loaded from an archieve directly?
will the following code look for the applet class in the specified archieve
<applet code=abcd.class width=100 height=100<br /> archive=abcd.jar></applet>
[This message has been edited by Jane Griscti (edited July 06, 2001).]