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

What do you mean by JVM?

587


What is multithreading in java?

551


1.IN CASE OF DYNAMIC METHOD DISPATCH WHY WE USE REFERENCE VARIABLE,WE CAN USE THE DIFFERENT DEFINED OBJECT DIRECTLY TO ACCESS THE DATA MEMBER AND MEMBER FUNCTION OF THAT RESPECTIVE CLASS?WHAT IS THE MAIN FUNCTION OF "REFERENCE VARIABLE" HERE?

3790


If we don’t want some of the fields not to serialize how to do that?

565


What is assembly language?

550






Explain the init method?

544


How can constructor chaining be done by using the super keyword?

617


What is "this" keyword in java? Explain

660


What isan abstract class and when do you use it?

847


What are identifiers in java?

575


What is not thread safe?

493


List primitive java types?

595


What do you mean by a JVM?

566


Explain different types of thread priorities ?

626


What happens when a thrown exception is not handled?

580