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 doubt about the program??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "doubt about the program???" Watch "doubt about the program???" New topic
Author

doubt about the program???

jayalakshmi charugundla
Ranch Hand

Joined: Jul 22, 2009
Posts: 57
Hi,
The following program giving the output as
xx
Xx
x
BUILD SUCCESSFUL (total time: 1 second)

The actual output is like,
Xx
Xx
x
Here we are adding only Xx element to the list but how it will come two Xx, Xx elements. Is there any printing mistake or any other reason?

Ankur kothari
Ranch Hand

Joined: Sep 06, 2009
Posts: 531
the output am getting is
xx
Xx
[space]x

ofcourse a printing mistake


Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9280
    
  17

I posted this question some time ago here and indeed its an error in the master exam...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
jayalakshmi charugundla
Ranch Hand

Joined: Jul 22, 2009
Posts: 57
yeah, I ran the program once again now it's showing what you said here. But why before it was showing differently?

Ankit I have seen the link .

thanks for your immediate respponse.


 
Consider Paul's rocket mass heater.
 
subject: doubt about the program???
 
Similar Threads
explain the code output
wildcard, super, add objects to collection
Collections.sort
Whats the output???
ArrayList Hijinx and the S.O.P statement