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

How to perform merge sort in java?

589


What is the difference between public, private, protected, and friend access?

577


What is the formula to calculate percentage?

540


Which is better list or arraylist in java?

499


What are controls and their different types in awt?

606






What data type is a string?

515


What are JVM.JRE, J2EE, JNI?

697


Explain the JDB in depth & command line.

576


How can we use primitive data types as objects?

562


Why do you canvas?

616


What is data type modifier?

531


When would you use a static class?

590


What is the concept of multithreading?

524


What are the different types of collections in java?

532


Which sorting is best in java?

543