1. >Computer Science
Found 5  QuestionsSET DEFAULT
Selected Filters
    Computer Science Java Strings
Exams
Subjects
Topics

List of top Computer Science Questions on Java Strings

Identify the output of the following code snippet:

s = "the Truth"
print(s.capitalize())
  • CBSE Class XII - 2026
  • CBSE Class XII
  • Computer Science
  • Java Strings

What is the output of the following code snippet?

s='War and Peace by Leo Tolstoy'
print(s.partition("by"))
  • CBSE Class XII - 2026
  • CBSE Class XII
  • Computer Science
  • Java Strings

What will be the output of the following statement?

print("PythonProgram"[-1:2:-2])
  • CBSE Class XII - 2026
  • CBSE Class XII
  • Computer Science
  • Java Strings
Which method is used to pause the execution of a thread for a specific period?
  • CPET - 2025
  • CPET
  • Computer Science
  • Java Strings
What will be the output of the following Java code?

public class Hello {
 public static void main(String[] args) {
    String str = "Hello";
    str.concat(" World");
    System.out.println(str);
  }
}
  • CPET - 2025
  • CPET
  • Computer Science
  • Java Strings