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 String Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "String" Watch "String" New topic
Author

String

srinivas sridaragaddi
Ranch Hand

Joined: Jul 24, 2007
Posts: 225



options:

Compiler error at line 10
compiler error at line 11
compiler error at line 12
compiler error at line 13
compiler error at line 14N/A


what is the output and why? can anyone explain


SCJP 5.0<br /> <br />"Skills are started with learning and mastered with improvement. Nothing is hereditary except death" BUDDHA...
ahmed yehia
Ranch Hand

Joined: Apr 22, 2006
Posts: 424
Did you even tried to compile it? it would simply tell you the problem.
srinivas sridaragaddi
Ranch Hand

Joined: Jul 24, 2007
Posts: 225
yes ahmed i tried it but i was unable to understand the error. due to resource problem i am posting all my doubts at the same time. i have not made a note of what was my exact doubt. sorry for that.. can you just throw some light on it i will check and then if i have any doubt i will come back. Dont mind....
ahmed yehia
Ranch Hand

Joined: Apr 22, 2006
Posts: 424
First you cant define the same variable more than one in a program i.e 's3'
The problem is in the last 2 lines, you are constructing two String objects passing 'byte' and 'char' and there are no such Constructors in String.
srinivas sridaragaddi
Ranch Hand

Joined: Jul 24, 2007
Posts: 225
ok thanks ahmed. i need to check api before i post...
[ October 04, 2007: Message edited by: srinivas sridaragaddi ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: String