G Giao Linh New member Sep 19, 2021 #1 What will be the output of the following Java code? Code: class output { public static void main(String args[]) { StringBuffer s1 = new StringBuffer("Hello"); s1.insert(1,"Java"); System.out.println(s1); } } A. hello B. java C. Hello Java D. HJavaello
What will be the output of the following Java code? Code: class output { public static void main(String args[]) { StringBuffer s1 = new StringBuffer("Hello"); s1.insert(1,"Java"); System.out.println(s1); } } A. hello B. java C. Hello Java D. HJavaello
N Nguyên Lê New member Sep 19, 2021 #2 Answer: d Explanation: Insert method will insert string at a specified position Output: Code: $ javac output.java $ java output HJavaello Upvote 0 Downvote
Answer: d Explanation: Insert method will insert string at a specified position Output: Code: $ javac output.java $ java output HJavaello