aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Java, COBOL & Programming Concepts Quiz
  • What will be the ouput of the following code snippet? Str...
Multiple choice technology programming languages

What will be the ouput of the following code snippet? String myString = new String("Java"); StringBuffer myBuffer = new StringBuffer("Java"); myString.replace('a','o'); myBuffer.replace('a','o'); System.out.println(myString+","+myBuffer);

  1. Jovo,Jovo

  2. Java,Jovo

  3. Java,Java

  4. Compile time error

Reveal answer Fill a bubble to check yourself
A Correct answer

Keep practicing — related questions

  • What will be the ouput of the following code snippet? StringBuffer myBuffer = new StringBuffer("Java Progra...
  • What is the output of following code: String s1 = new String("java"); String s2 = s1.replace('a','i'); s1.c...
  • What will be the ouput of the following code snippet? String myString1 = "Hello World!"; myString1.replace(...
  • What will be the output of the program? public class Test138 { public static void stringReplace (String tex...
  • What will be the ouput of the following code snippet? StringBuffer myBuffer = new StringBuffer(15); myBuffe...
  • What will be the output of the given code? String s = “Welcome To Java” s.substring(4, 4);
  • What is the output of the following: StringBuffer sb1 = new StringBuffer("Amit"); StringBuffer sb2= new Str...
  • What will be the output of given code? String s = “Welcome To Java”; s.length(); s.charAt(9);
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy