vasu matt

Greenhorn
+ Follow
since Dec 21, 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 vasu matt

Hello arifat
On IO i had got roughly about 5 to 6 questions including files.They are very easy unless u know the constructors very well,i mean constructors of streams,readers,writers and random access files.No need to worry about that,indeed i had got 100% in it.For IO KAM book is more than enough.I wish u very best of luck for the exam and about the mock exams i can't tell u in particular,u just go through some of them.
vasanthi
21 years ago
hi sean casey,
Yes i had taken many of the mock exams,it surely helps u a lot,the real exam is quite similar to the mock exams u take,these mock exams actually helps u a lot,it is better u take as many mock exams as possible.It is better u first gain the confidence and later u write the exam,but don't worry the real exam won't be so tought as some of the mock exams are.I wish u very best of luck for the exam.
vasanthi
21 years ago
Hi all,
I finally passed with 72%,not a great score i know.I had only one question with 28 lines and all others were just of 8 to 10 lines.Exam was quite easy,but u need be expert in fundas.So all of u who are preparing for the exam just have a great fundation of basics.Questions on java.lang was quite tough and threads was not so tough.IO was also easy ,flow control and remaining sections was also easy.But i scored less in awt,GC,java.lang and java.util.
I would like to thank all of them here in javaranch and they are doing a wounderful job here.If anybody needs any help they are most welcome and i will have a look at this page daily atleast for one week.
vasanthi
21 years ago
Can anybody explain me the answer for this,it is better if the explaination is in detail.
import java.io.*;
public class TestIPApp {
public static void main(String args[]) {
RandomAccessFile file = new RandomAccessFile("test.txt", "rw");
file.writeBoolean(true);
file.writeInt(123456);
file.writeInt(7890);
file.writeLong(1000000);
file.writeInt(777);
file.writeFloat(.0001f);
file.seek(5);
System.out.println(file.readInt());
file.close();
}
}
Select correct answer:
A) 123456
B) 7890
C) 1000000
D) .0001
regards
vasanthi
congratulations for a great success!!!
Can u do me a favour,can u just tell me where can i find velu's and jyothi krishnan's notes and tell me how did u go about threads,well looking forward for ur reply and my mail id is vasanthi@123india.com.Please mail me as early as possible and send me some more tips for the exam.
regards
21 years ago
Congrats for a great success!!!
Well i wanted a favour from u.I am writing the scjp exam very shortly,can u tell me how did u go about threads.I am very much tensed,please help me.If u have prepared any notes please mail it to me and my mail id is vasanthi@123india.com.Please do it as early as possible and i am running short of time and if u know any mock exam which are available online please tell me.
regards
vasu
21 years ago
Hi congrats for the great success
Can u please guide me how can i go about threads,as i am writing the exam very shortly and u can write to me and i will be available at this id vasanthi@123india.com and if u have any notes pls forward it to me.
regards
vasanthi
21 years ago
congrats harita,
Can u just tell me how were threads questions,was it very tough and tell me how did u prepare for that.I am writing the test very shortly please guide me.
regards
vasanthi
21 years ago
Hello
Congratulations!! its really a great score and i just saw ur score,i was surprised to see that u have scored 100% in threads as i have seen people saying that threads are very tough.I think ur the person who can help me out.I am writing the exam very shortly,so tell me what material did u refer for threads and how should i go about threads i have only 12 days in my hands,if u have anything to say more on the exam please mail me and my mail id is vasanthi@123india.com and if u have the material for threads pls send it to me.
thanking u in advance
vasanthi
21 years ago
Hello everybody
I have seen people writing that Lang's material is very good for the SCJP exam.I do not know the link for it,can anybody please give me the link for that material,it will be a great help.
regards
vasu
hello everybody
can anyone of u please explain me the answers for these questions.I am actually very confused.
code:
1)
Which statements concerning the effect of the statement gfx.drawRect(5, 5, 10, 10) are true, given that gfx is a reference to a valid Graphics object?
1)the rectangle drawn will have a total width of 5 pixels
2)the rectangle drawn will have a total width of 6 pixels
3)the rectangle drawn will have a total width of 10 pixels
4)the rectangle drawn will have a total width of 11
2))public class Qcb90 {
int a;
int b;
public void f() {
a = 0;
b = 0;
int[] c = { 0 };
g(b, c);
System.out.println(a + " " + b + " " + c[0] + " ");
}
public void g(int b, int[] c) {
a = 1;
b = 1;
c[0] = 1;
}
public static void main(String args[]) {
Qcb90 obj = new Qcb90();
obj.f();
}
}
1)000
2)001
3)010
4)100
5)101
ans:101pixels
3)Which statements concerning the following code are true?
class A {
public A() {}
public A(int i) { this(); }
}
class B extends A {
public boolean B(String msg) { return false; }
}
class C extends B {
private C() { super(); }
public C(String msg) { this(); }
public C(int i) {}
}
1)the code will fail to compile
2)the contructor in A that takes ine as arg will never be called as a result of constructing an object of class B or C
3)class c has three constr
4)objects of class B cannot be constructed
5)at most one of the constructor of each class is called as result of constructing an object of class c
regards
vasu
can anybody please explain me the answers for this queries,i do not know the answer actually.these are from khalids mock papersWhich is the earliest line in the following code after which the object created on the line marked (0) will be a candidate for being garbage collected, assuming no compiler optimizations are done?
code/
1)
public class Q76a9 {
static String f() {
String a = "hello";
String b = "bye"; // (0)
String c = b + "!"; // (1)
String d = b;
b = a; // (2)
d = a; // (3)
return c; // (4)
}
public static void main(String args[]) {
String msg = f();
System.out.println(msg); // (5)
}
}
1)the line marked(1)
2)the line marked (2)
3)the line marked (3)
4)the line marked (4)
5)the line marked (5)
2)
Given that a static method doIt() in a class Work represents work to be done, what block of code will succeed in starting a new thread that will do the work?
CODE BLOCK A:
Runnable r = new Runnable() {
public void run() {
Work.doIt();
}
};
Thread t = new Thread(r);
t.start();
CODE BLOCK B:
Thread t = new Thread() {
public void start() {
Work.doIt();
}
};
t.start();
CODE BLOCK C:
Runnable r = new Runnable() {
public void run() {
Work.doIt();
}
};
r.start();
CODE BLOCK D:
Thread t = new Thread(new Work());
t.start();
CODE BLOCK E:
Runnable t = new Runnable() {
public void run() {
Work.doIt();
}
};
t.run();
1)code block A
2)code block B
3)code block C
4)code block D
5)code block E
/code
Can anybody tell me the answer for this and explain me why so.
code/
Given the following code, which statements concerning the objects referenced through the member variables i, j and k are true, given that any thread may call the methods a, b and c at any time?
class Counter {
int v = 0;
synchronized void inc() { v++; }
synchronized void dec() { v--; }
}
public class Q7ed5 {
Counter i;
Counter j;
Counter k;
public synchronized void a() {
i.inc();
System.out.println("a");
i.dec();
}
public synchronized void b() {
i.inc(); j.inc(); k.inc();
System.out.println("b");
i.dec(); j.dec(); k.dec();
}
public void c() {
k.inc();
System.out.println("c");
k.dec();
}
}
1)i.v is guaranteed always to be 0 or 1
2)j.v is guaranteed always to be 0 or 1
3)k.v is guaranteed always to be 0 or 1
4)j.v will always be greater than or equal to k.v at any given time
5)k.v will always be greater than or equal to j.v at any given time
/code