File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Confused with mock exam question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Confused with mock exam question" Watch "Confused with mock exam question" New topic
Author

Confused with mock exam question

Ashish Agre
Ranch Hand

Joined: Jan 22, 2011
Posts: 73

It was the Question Excercise9-1 : Want to know if(true) code = "Right; else code = "Wrong";


| B.E IT | SCJP 6.0 98 % |
Javin Paul
Ranch Hand

Joined: Oct 15, 2010
Posts: 281


Hi Ashish , Can you clarify your question , its not really clear why you are confused and your title and code doesn't relate together , can you please clearly state what problem you are facing and may be we can help you out.

Thanks
Javin


http://javarevisited.blogspot.com - java classpath - Java67 - java hashmap - java logging tips java interview questions Java Enum Tutorial
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9293
    
  17

Hi Ashish, welcome to javaranch.

As Javin said, please specify your question more clearly. Don't put your whole question in the subject line, I've fixed the subject line for you...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Ashish Agre
Ranch Hand

Joined: Jan 22, 2011
Posts: 73

well this was he question in SCJP 6 book exccercise i just wanted to chk whether the solution i provided is roght or wrong
Q : Create a simple counting thread. It will count to 100, pausing one second between each number. Also, in keeping with the counting theme, it will output string every ten number.
Sunny Bhandari
Ranch Hand

Joined: Dec 06, 2010
Posts: 448

The only thing I notice is that you are pausing 1 second after every ten numbers and not after each number. Move Thread.sleep out of if(i%10) condition


Java Experience
Ashish Agre
Ranch Hand

Joined: Jan 22, 2011
Posts: 73




will this work!!! seems that it is working?
Sunny Bhandari
Ranch Hand

Joined: Dec 06, 2010
Posts: 448

I will go with (Assuming no InterruptedException is going to occur)

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Confused with mock exam question