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

Answer Posted / selvan

It shows compile error, bcoz without class how it should be
run? so only coming expection. Declaration And all correct.

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are green threads in java?

555


What is the benefit of inner classes in java?

616


Can we have any code between try and catch blocks?

563


What do you understand by looping in java? Explain the different types of loops.

565


Why Do I Get A "permission Denied" Error After Downloading The .jnlp Java Launcher For The Vkvm?

635






Can we override constructors?

544


Explain what do you mean by functional overloading in java?

557


Can we call the run() method instead of start()?

594


When would you use a static class?

588


What is the impact of declaring a method as final?

565


If system.exit (0); is written at the end of the try block, will the finally block still execute?

622


Which way a developer should use for creating thread, i.e. Sub classing thread or implementing runnable.

524


How to find the largest value from the given array.

528


What will happen if non-synchronized method calls a static synchronized method and what kind of lock it acquires?

520


What is diamond operator in java?

503