Toggle navigation
Home
KPSC Previous Question Papers
Article Category
kerala psc
upsc
General
Popular Pages
Multiple Choice Question in കറന്റ് അഫയേഴ്സ് മേയ് 11
Multiple Choice Question in കറന്റ് അഫയേഴ്സ് - ഏപ്രില് 07
Multiple Choice Question in current-affairs-2016-12-22
Multiple Choice Question in current-affairs-2017-01-22
Multiple Choice Question in biochemistry-structure-and-properties-of-peptides
Multiple Choice Question in കറന്റ് അഫയേഴ്സ് - ക്വിസ് | ഡിസംബര് 05 - 12
Multiple Choice Question in biochemical-engineering-fluid-flow
Multiple Choice Question in biochemistry-allosteric-effects
Multiple Choice Question in current-affairs-2017-05-07
Multiple Choice Question in കറന്റ് അഫയേഴ്സ് മേയ് 26
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 s = "hello"; Object o = s; if( o.equals(s) ) { System.out.println("A"); } else { System.out.println("B"); } if( s.equals(o) ) { System.out.println("C"); } else { System.out.println("D"); } A B C D
(A): 1 and 2
(B): 1 and 3
(C): 2 and 4
(D): 3 and 4
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
Show Similar Question And Answers
QA->The program that monitors users activity on internet and transmit that information in background to somewhere else is termed as....
QA->When an object travels around another object it is known as?....
QA->When an object is heated, the molecules of that object?....
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:....
MCQ->What will be the output of the program? String s = "hello"; Object o = s; if( o.equals(s) ) { System.out.println("A"); } else { System.out.println("B"); } if( s.equals(o) ) { System.out.println("C"); } else { System.out.println("D"); } A B C D....
MCQ->What will be the output of the program? class Tree { } class Pine extends Tree { } class Oak extends Tree { } public class Forest1 { public static void main (String [] args) { Tree tree = new Pine(); if( tree instanceof Pine ) System.out.println ("Pine"); else if( tree instanceof Tree ) System.out.println ("Tree"); else if( tree instanceof Oak ) System.out.println ( "Oak" ); else System.out.println ("Oops "); } }....
MCQ->What will be the output of the program? public class Test178 { public static void main(String[] args) { String s = "foo"; Object o = (Object)s; if (s.equals(o)) { System.out.print("AAA"); } else { System.out.print("BBB"); } if (o.equals(s)) { System.out.print("CCC"); } else { System.out.print("DDD"); } } }....
MCQ->public void foo( boolean a, boolean b) { if( a ) { System.out.println("A"); / Line 5 / } else if(a && b) / Line 7 / { System.out.println( "A && B"); } else / Line 11 / { if ( !b ) { System.out.println( "notB") ; } else { System.out.println( "ELSE" ) ; } } }....
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