shakunthala Divakar

+ Follow
since Aug 01, 2007
Merit badge: grant badges
For More
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 shakunthala Divakar

I wonder, why my thread is closed with out any reply.
I am really very disappointed. Is there anything wrong with the question i have asked.I beg your pardon, if there is any mistake from my side.
but this is so rude to close my topic without any reply or even a notice.
Hi Ranchers,

Today i cleared the test with 83% and i had worked hard.
I have less than one year experience in java and rightnow unemployed.
Can you please suggest me, how i should update my resume with SCJP certification and how can i put the logo?.
I hope this certification might help me to get a job.

please suggest me how to put the logo in my resume..

thank you in advance

16 years ago
Hello Ranchers,

I have 2 questions
1. From a mock exam

Which of the following statements will create a file called test.txt in your current directory?

1. File f = new File("test.txt");
2.FileOutputStream fos = new FileOutputStream("test.txt");
3.RandomAccessFile raf = new RandomAccessFile("test.txt", "r");
4.RandomAccessFile raf = new RandomAccessFile("test.txt", "rw");

Given answer is 2 and 4.
My question is
FileOutputStream deosn't create a file right?It throws FileNotFound exception if the doesn't exist.

2. char \u0063='\u0063';
the above declaration is valid but how?
how \u0063 is considered as valid identifier?

Please can anybody explain this??

Thank you in advance
I got it.Thank you vey much
Hello Ranchers,
Here below is a question from Mock exam

1.The code does not compile - " is never reached"
2 .The code compiles and runs 3 non ending non demon threads.
3.The code compiles but runs only 1 non ending, non demon thread.

Given answer is 3 but i was thinking it should be 2

As I understand, main() will continue with its next statements after starting the other 2 thread should run after the first one.

Please anybody can explain this??
Thanks in advance
sorry again
The statement is An instance method that is not abstract can not be overridden by an abstract NOT right.
Hi Neha Bhattad ,
i think even option a. is not true so the given anwer in mock exam is right.
Try the below code

shakunthala Divakar
Hi javaranchers
I am sorry.The code i was trying was wrong.
i have missed abtract modifier for print method.
The statement
An instance method that is not abstract can not be overridden by an abstract right
Hi Javaranchers
The below quetion is from a Mock exam
Which of the following statements is true?

a. An abstract method can not be overridden by an abstract method.
b. An instance method that is not abstract can not be overridden by an abstract method.
c. An abstract method declaration can not include a throws clause.
d. The body of an abstract method is represented by a set of empty brackets.
e. None of the above

Answer Given is e.None of the above.
but i expected b.
And i tried with some code to test

the above shows error at line 1 saying,This metthod requires body instead of ;
Then the anwer given in mock exam is i right???

Shakunthala Divakar
Hi Burkhard Hassel

Thank you very much for spending your precious time.
your reply was very useful for me.

(that was my second post)

Shakunthala Divakar
Hi javarachers

The output for the above is :1,0
I was expecting as 0,1.
My understanding was,post increment is always done after the end of statement.but in the above code inceremented i value is passed to m(i) before the and of statement.
The above code is from link and question number 22web page

Please can anyone explain the above.

shakunthala Divakar
Hi subodh gupta
Its very basic ,which i got cnfused when instance tried to access private member.
thanks a lot for replying to my doubt

If you add java.lang.Enum then the given code doesn't compile.
and If you add [code] java.lang.* and also which is by default added, then it compiles fine.

so i belive that , the class Enum is not imported until you use that in your code without defining it.
In the given code.If you use Enum next then,that will not be from java.lang instead that will be the one you defined.
I think Enum is not redefined,as it is not imported yet
Hi all,

In the follwing code
private method display() is accessed in main().
I know, main can access only static memebers of its class and other members accessed through instance.

I didn't understand,how could the private method be accesed directly by the object .

code :
public class privatetest {
private void display()
System.out.println("Private method");
public static void main(String[] args)
new privatetest().display();


If main method is in different class ,then it doesn't compile.
Can one please explain the above???

Shakunthala Divakar