Toggle navigation
Home
KPSC Previous Question Papers
Article Category
kerala psc
upsc
General
Popular Pages
Multiple Choice Question in aptitude-area
Multiple Choice Question in non-verbal-reasoning-grouping-of-images
Multiple Choice Question in aptitude-compound-interest
Multiple Choice Question in engineering-mechanics-kinetics-of-a-particle-impulse-and-momentum
Multiple Choice Question in database-database-redesign
Multiple Choice Question in 035/2016
Question Answer in malayalam-kerala-psc-questions
Multiple Choice Question in malayalam-kerala-psc-questions
Multiple Choice Question in current-affairs-2017-03-05
Multiple Choice Question in electronic-devices-bipolar-junction-transistors
Question Answer in Malayalam General Knowledge
Question Answer Bank
Multiple Choice Question Bank
Question Answer Category
Multiple Choice Question Category
Home
->
Multiple Choice Questions
Question Set
java programming java lang class
1. What will be the output of the program? String d = "bookkeeper"; d.substring(1,7); d = "w" + d; d.append("woo"); / Line 4 / System.out.println(d);
(A): Compilation fails.
(B): wbookkeeper
(C): wbookkeewoo
(D): wookkeewoo
Previous Question
Show Answer
Next Question
Add Tags
Report Error
Show Marks
Ask Your Doubts Here
Type in
(Press Ctrl+g to toggle between English and the chosen language)
Post reply
Comments
By: guest on 02 Jun 2017 01.26 am
In line 4 the code calls a StringBuffer method, append() on a String object.
Show Similar Question And Answers
QA->Name the translatory program which translates the high level language into machine language before running the program?....
QA->An unauthorized program which functions from inside what seems to be an authorized program, thereby concealing what it is actually doing:....
QA->An unauthorized program which functions from inside what seems to be an authorized program, thereby concealing what it is actually doing:....
QA->An unauthorized program which functions from inside what seems to be an authorized program, thereby concealing what it is actually doing:....
QA->An unauthorized program which functions from inside what seems to be an authorized program, thereby concealing what it is actually doing:....
MCQ->What will be the output of the program? class Happy extends Thread { final StringBuffer sb1 = new StringBuffer(); final StringBuffer sb2 = new StringBuffer(); public static void main(String args[]) { final Happy h = new Happy(); new Thread() { public void run() { synchronized(this) { h.sb1.append("A"); h.sb2.append("B"); System.out.println(h.sb1); System.out.println(h.sb2); } } }.start(); new Thread() { public void run() { synchronized(this) { h.sb1.append("D"); h.sb2.append("C"); System.out.println(h.sb2); System.out.println(h.sb1); } } }.start(); } }....
MCQ->What will be the output of the program? String d = "bookkeeper"; d.substring(1,7); d = "w" + d; d.append("woo"); / Line 4 / System.out.println(d);....
MCQ->What will be the output of the program? public class Test { public static void main(String[] args) { final StringBuffer a = new StringBuffer(); final StringBuffer b = new StringBuffer(); new Thread() { public void run() { System.out.print(a.append("A")); synchronized(b) { System.out.print(b.append("B")); } } }.start(); new Thread() { public void run() { System.out.print(b.append("C")); synchronized(a) { System.out.print(a.append("D")); } } }.start(); } }....
MCQ->What will be the output of the program? class Test116 { static final StringBuffer sb1 = new StringBuffer(); static final StringBuffer sb2 = new StringBuffer(); public static void main(String args[]) { new Thread() { public void run() { synchronized(sb1) { sb1.append("A"); sb2.append("B"); } } }.start(); new Thread() { public void run() { synchronized(sb1) { sb1.append("C"); sb2.append("D"); } } }.start(); / Line 28 / System.out.println (sb1 + " " + sb2); } }....
MCQ->What will be the output of the program? boolean bool = true; if(bool = false) / Line 2 / { System.out.println("a"); } else if(bool) / Line 6 / { System.out.println("b"); } else if(!bool) / Line 10 / { System.out.println("c"); / Line 12 / } else { System.out.println("d"); }....
×
×
Type The Issue
×
Your Marks
Terms And Service:We do not guarantee the accuracy of available data ..We Provide Information On Public Data.. Please consult an expert before using this data for commercial or personal use | Powered By:Omega Web Solutions
© 2002-2017 Omega Education PVT LTD...
Privacy
|
Terms And Conditions
Question ANSWER With Solution