suppose string s1="rajnish";
string s2="bhaskar";
then what will be happend ?

Answer Posted / tck

It shows the systex error,The String is the final class in
java the syntax for string class is
String s1="rajinesh";
String s2="bhaskar";
so we have to declare the string variables like this .

Is This Answer Correct ?    8 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we define private and protected modifiers for the members in interfaces?

511


What are the rules for naming an array?

500


What happens if main method is not static?

474


What is int argc char * argv?

542


Where to store local variables?

562






What does += mean in java?

551


How are destructors defined in java?

541


What are the two ways of implementing multi-threading in java?

787


What does opcode mean?

506


What do you understand by classes in java?

527


What is a local class in java?

556


explain copyonwritearraylist and when do we use copyonwritearraylist?

519


Can we define a package statement after the import statement in java?

545


What is the use of callablestatement?

554


What is difference between float and double?

479