Skip to content

Computer Science · Class 12 · ISC

String Handling

String and StringBuffer, string methods, and palindrome, anagram and word-level problems.

6questions

Board PYQs
0
Practice
6
Topics
0
  • Most common: 3 marks

Syllabus mapping: ISC syllabus (CISCE) (opens CISCE's website in a new tab)

6 questions

  • Practice question

    3 marks

    Write a Java program segment to count the words in a sentence s that has single spaces between words.

    String HandlingMediumApplication based

  • Practice question

    3 marks

    State three differences between the String and the StringBuffer classes.

    String HandlingMediumShort answer

  • Practice question

    3 marks

    Write a Java program segment to count the number of vowels in a given string s.

    String HandlingMediumApplication based

  • Practice question

    3 marks

    What is the output of: String s = "Programming"; System.out.println(s.indexOf('g') + " " + s.lastIndexOf('g') + " " + s.replace('g', 'G'));

    String HandlingMediumNumerical

  • Practice question

    3 marks

    What is the difference between s1 == s2 and s1.equals(s2) for two String references?

    String HandlingMediumNumerical

  • Practice question

    3 marks

    Write a Java program segment to change the case of every letter of a string s.

    String HandlingMediumApplication based