This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "doubt about the program???" Watch "doubt about the program???" New topic

doubt about the program???

jayalakshmi charugundla
Ranch Hand

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

The actual output is like,
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

ofcourse a printing mistake

Ankit Garg

Joined: Aug 03, 2008
Posts: 9291

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.

It is sorta covered in the JavaRanch Style Guide.
subject: doubt about the program???
Similar Threads
Whats the output???
ArrayList Hijinx and the S.O.P statement
explain the code output
wildcard, super, add objects to collection