A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/quizzes/java-string-basics/ below:

Quiz about Java String Basics

What is the correct way to declare a String in Java?

Why are Strings immutable in Java?

What will be the output of the following code?

Java
String s1 = "Java";
String s2 = "Java";
System.out.println(s1 == s2);

What will be the output of the following code?

Java
String s1 = new String("Java");
String s2 = new String("Java");
System.out.println(s1 == s2);

Which method is used to concatenate two Strings in Java?

What will be the output of the following code?

Java
String s = "Hello";
s.concat(" World");
System.out.println(s);

How can you make String mutable in Java?

What will be the output of the following code?

Java
String s1 = "Hello";
String s2 = s1.concat(" World");
System.out.println(s2);

How does the intern() method affect Strings in Java?

What is the advantage of using String over StringBuilder in multi-threaded applications?

There are 10 questions to complete.

Take a part in the ongoing discussion


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4