meeta verma

Greenhorn
+ Follow
since May 15, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by meeta verma

you will definately be able to distinguish between { and (. Well I didn't find the gui bad but neither impressive .

But i did the 10 min tutorial before the exam. It makes you very comfortable. The marker at the extreme left is very important.Also u have to click on exhibit button to see the full code in some cases.There is a mock test(I forgot which, i gave many)which simulates almost the same gui i.e. with the exhibit button.
I cleared SCJP 1.4 today. I got 90%, missed out in threads and Access Control questions.
These are some key facts I want to share with you all.
Firstly, SCJP tests ur fundamentals. U need not be a expert programmer for that. I have no experience of Java but 2 yrs of C++. I started studying java some 2-2.5 months back and then proceeded to prepare for SCJP slowly. Just did K&B and mocks on javaranch mocklist.
In the last 4 days I repeated all Danchisholm and Marcus tests, K&B objectives and my notes (questions of various mocks which i attempted wrong ).

Also I had the notion that the code would be pretty long in the test but that was not the case. 8-10 lines usually and a bit more in some 7-8 questions.

One thing, I read a post 2-3 days back which stated to read K&B's each line."You will get questions which u would never imagine". That's very true. I missed out in these questions. Had I read the post earlier and studied each and every line , score would have been different.

I gave test in NIIT hyd. The environment was ok excepting when students were coming in the room besides the testing room and speaking loudly.There was one girl with a shrill voice which irritated me the most. I had to literally close my ears with my fingers to concentrate, but becoz this was during the last 15 min when I was revising it was bearable.
I think one should take ear plugs....

Thats all from my end.

Will continue to be in the various forums listed here...

Thats a lot !!!This forum is excellent
20 years ago
I want to access the sample questions provided by sun. I registered too for this. But are these available only through post or they can be accessed on web too..
I want then urgently....Pls help
class AQuestion
{
private int i=giveMeJ();
private int j=10;

AQuestion()
{
System.out.println("In default cons");
}

private int giveMeJ()
{
System.out.println("In giveMeJ");
return j;
}

public static void main(String []args)
{
System.out.println((new AQuestion()).i);
}
}
Ans In giveMeJ
In default cons
0

I couldn't understand the ans. Before creating an instance we are able to access a non static member function....
I couldn't understand properly the ans to this quest.

class Parent
{
private void method1()
{
System.out.println("Parent's method1()");
}


public void method2()
{
System.out.println("Parent's method2()");
method1();
}

}


class Child extends Parent
{
public void method1()
{
System.out.println("Child's method1()");
}


public static void main(String args[])
{
Parent p = new Child();
p.method2();
}
}

Ans o/p is
Parent's method2();
Parent's method1();
I understand that private methods are not inherited and not overridden. Still i was expecting "Child's method1()" to be printed. When p.method2()(then inheritted method2)is called, a this pointer is passed which points to Child's object. Child doesn't know anything about the super classes method1(), but then the ans......I think I am making a blunder somewhere. Pls help me in this.
Also if u could give some link on this...
I was giving Barry Boone's Mock Exam
http://www.geocities.com/SiliconValley/Orchard/9362/java/javacert/newboone1-19.html#
But i could write only the first 1-19 questions and for the rest and for the ans it says the page cannot be found.
Has the link changed. Is anybody using it. Is it still free? if yes, pls do send me
But i have read that sun is interested in testing fundamentals and logic and not the API which can be accessed anytime while coding/designing java applications...
But i have read that sun is interested in testing fundamentals and logic and not the API which can be accessed anytime while coding/designing java applications...
Are there many questions related to the API in the exam? Can you put it in approximate figures

Why this gives a compilation error? Is continue to be used only with for and while.
(code tags added)

[ May 24, 2004: Message edited by: Barry Gaunt ]
[ May 24, 2004: Message edited by: Barry Gaunt ]
class EBH012 {
public static void main (String[] args) {
byte x = 3;
byte y = ~x + 1; //1
System.out.print(-x == y); //2
}}

The problem here is in statement 1 where ~x+1 results in an integer and you try to assign in a byte and so the compiler gives an error.
statement 2 is fine perfectly. You can compare a byte with an int etc.

Even I was confused with this and posted a topic on "Comparison and equality operators" a couple of days ago.
The compiler will widen the smaller operand , in this case byte into an int and check for equality.
I never thought we could compare (>,<,== ,!=) an
int with a double
or
double with long
or
long with float etc.

I thought the primitives should be of the same type for comparison.

Can someone throw some light on this......
0xffffffff = 1111 1111 1111 1111 1111 1111 1111 1111
since, the sight bit is one it represents a negative number.

Now 0xffffffff >> 1, i.e. signed right shift
0xffffffff >> 1 = 1111 1111 1111 1111 1111 1111 1111 1111 (u get same as previous) i.e. shift 1 bit to the right and add 1 as the most significant bit. We add one becoz we know that this number is negative (signed right shift of a negative num is always negative).
Now find the decimal of this negative num i.e. take 2's complement which will be 0000 0000 0000 0000 0000 0000 0000 0000 and add 1 and remember to put a negative sign.
So the result is -1
ya even i was expecting that .
Also

public static void main(String[ ] args)
{
int k=0;
k += ++k;
System.out.println(k);//1
k=0;
k=k+(++k);
System.out.println(k);//1

k=0;
k=++k +k;
System.out.println(k);//2
}
It seems as though left associativity is playing the role everywhere.
So what is the difference in default initialization of local and member arays?