Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

String

 
srinivas sridaragaddi
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



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
 
ahmed yehia
Ranch Hand
Posts: 424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you even tried to compile it? it would simply tell you the problem.
 
srinivas sridaragaddi
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok thanks ahmed. i need to check api before i post...
[ October 04, 2007: Message edited by: srinivas sridaragaddi ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic