You are on page 1of 61
= 03- Using Operters ana Decison Constructs» Founéaton Time ett 024327 \Wihich ofthe following statements concerning the switch construct are true? Please select 3 options La character tteral can be used as 2 value for 2 case label. EA tong! cannot be used as 2 switch variable. Ean empty switch block is 2 valid construct. TIA switch block must have a default label [i oresent, the default label must be the last ofall the labels. ‘Add Note Previous Next Review _—Discuss* x 3 of 78 GID: |enthuware.ocaip.ins.2.1257) Tnide sectioryroughness mark O as BE * Ge O-ring wth Ie P\~ Tie ot 125203 x 0. of 76 a1: [enthuware.oaipivs.21426) hide sectiortoughness Cvark 2s HB hit of the flowing are tru regarding the new Date Te AP of 1av9 6? Please select 2 options A ttuses the calendar system defined in 150-8604 as the default calendar. [lost ofthe actual date related classes inthe Date-time API such 35 Locabate, Localtime, and Localbaterime are immutable. i tecainaterime include time zone information but LocaDate does net 1 To create a Localbate or a LocalbateTime object, you can use one of their saveral constructors. Add ote Previous Next Review Discuss Ge oF Wing wihinhetane: Foundation Tne et-023109 x of 76 a1: enthuwareoeaip.iva.2.1171 hide sectiortoughness Cvark 2s HB Consider the folowing variable declaration within the defintion of an interface: ‘Which ofthe following declarations defined in a non-abstract cass, is equivalent tothe above? lease select 1 option Omublic static ant 3 = lo: (O public final ant 2 = 10 O public static final int 2 = 10 @ rwiie ans 3 ~ 101 (O tent ant = ar dd Note Previous Next Review _—Discuss* oF -osingwithinhetance: Feundton Tne e-022739 x 07 |of76 am : [enthuware.oaipiv.2.1003 hide sectiortoughness Cvark 2s HB ‘ivan the felling coda, which stataments ar rue? sncertace Anvnchste | sczing ceecesbe()/ ) ‘coeae Eourinecles saplenenta Astinchsle{ public String desceibe()( sun “4 mheelee “+ sane | ' oeng Tenineeles excenss Psnineslest public String degcribe()| setuen * 2 wneeter "+ naner ) please select 3 options An instance of twoinceier is also an instance of roussmeeter. EZ An instance of twainceiris a valid instance of auconchste ‘The use of inheritance is not justiied here because a Tacifecier isnot really Fousthecier inthe real world thatthe code is trying to modal [D1 the code will comple only if mane is removed from Twoitele= the code will Fall to comaite. dd Note Previous Next Review _—Discuss* Ge 07 -Wosingwihinhetane: Foundtion Tne et C22608 x of 76 ato: [enthuware.aipivs.2.1308) hide sectiortoughness Cvark 2s HB \whien of these statements concerning interfaces are te? Please select 2 options Clan interface may extend an interface. lan interface may extend a dass and may mplement an interface, EA dass can implement an interface and extend 2 dass. Ta dass can extend an interface and can implement a dass. [Z] An interface can only be implemented and cannot be extended. Add Note Previous Next Review _—Discuss* 06 Handing cepts: Foundtbon Tne Le 022255 x 29 of 76 a10: (enthuwareoeaip..va.2.1305 hide sectiortoughness Cvark 2s HB \hien ofthese statements are rue? Please select 2 options [112 RuntimeExcestion is not cauoht, the method wil terminate and normal execution ofthe thread will Flan overriding method mast dedare that it tows the same exception dasses as the method t overrides. ‘The main method of a program can declare that it throws checked exceptions. [[ Amethod declaring that it throws a certain exceotion dass may throw instances of any subclass ofthat ‘exception dass. TD finaly blocks are executed and only if an excention gets thrown while inside the corresponding ty block. ‘Add Note Previous Next Review _—Discuss* = OF Working wthinhertance + Foundation Time Left 02.2158, Q 10 of 78 GID: enthuware.ocaip.ive.2.1140 [hide section/Toughness mare Which of the following are valid decarations in a class? lease select 1 option @ sbocract int absMetted int paran) throws Exception? cae (O shotract native int sbsvcthedline paren) throws Exception? (© tioas native getvariance() chraa Exceptions (O abetract private int apswetnoa(int parani thzove Exception? dd Note Previous Next Review _—Discuss* = O}-JounBasicr + Foundstion TimeLeft - 022015 x 111 of 76 aio: (enthuwareoeap..va2.1007| hide sectiortoughness Cvark 2s HB How can you declare a method screvechod() such that an instance ofthe cass is not needed to access tt and ‘allthe mambers of the same package have accass tot. Please select 3 options EA rupiie acetic vera acmaserncay ] scatie vena somssetacay) 7] prorected eratis votd someserhoa() TD vosa sonecnoa) H peocecred void scmeMectealy Ti pubtic anetract static void sonetertod() ‘Add Note Previous Next Review _—Discuss* = O}-Jovn Basics + Foundation TimeLeft - 021923 x 12 |of76 a1: [enthuware oainiv8.2955 hide sectiortoughness Cvark 2s HB aninstance member lease select 2 options Lean be a variable, a constant or a mathod. Lis a vanatle or 2 constant belongs to the dass. belongs to an instance ofthe dass. Eis same 2s a local variable. Add Note Previous Next Review _—Discuss* Ge o7- Woking wihinhetance: Feundton Tne et-021822 x 0113 |of76 a1: [enthuware ain ive 2.1259 hide sectiortoughness Cvark 2s HB here, in constructor, can You place 2 cata 3 super dass's constructor? Please selec option (© anywhere in the constructors body. @ As the frst statement in the constructor. (© Only as the first statement and it can be called just lke any other method callie. ClassWamel (© You cant call super dass's constructor in a base class as constructors are nat inherited. (O None of the above, Add Note Previous Next Review Discuss {= 0} Java Bosics- 00 Concepts : Foundation Time eft - 2706 x 114 |of 76 a1: [enthuware ain iv 2.1160) hide sectiortoughness Cvark 2s HB (Gwen that Ourttass is @ MyClass and OurCiaes has a YourCteas object ‘Which ofthe fellowing eptions are corract? (Assume that OurCless, MyClass, and YourCiens are valid java classes.) lease select 2 options CKimyciass contains a reference to Ourclass 1 ourclass contains 3 reference to yclass Hi myciass contains reference to YourClass EZ] ourclass contains a reference to Yourclass [Dl ourciass inherts fram MyCiass Add Note Previous Next Review _—Discuss* {oF Wing wihinhetance: Foundton Tne e025 x 15 |of76 a1: [enthuware oainivs.2985 hide sectiortoughness Cvark 2s HB hit ofthe flowing statements ae rue? Please select 2 options 2 private methods cannot be overridden in subclasses, A subclass can override any method in a non-fnal superclass. {an overriding method can dedare that it throws 2 wider spectrum of chacked exceptions than the method it Os ovemidina, “The parameter lst of an overriding method must be a subset ofthe parameter Ist of the method that tis O oveniéina. [[ The overriding method may opt not to dedlare any throws dause even f the original method has a throws dause. ‘Add Note Previous Next Review _—Discuss* = 0b Working wih Methods + Foundation Time Left 021225, x 16 |of 76 a1: [enthuwarecajpiv.2.630 hide sectiortoughness Cvark 2s HB Consider te flowing method public vosd meshoa(ant m, Object p, double 4) ' ‘Assuming that there is no other method with the same name, which ofthe following options are correct ‘regarding the above method? lease select 1 option (O st this method is called with two parameters, the value of din the method willbe 0.9. (& itthis method is called with one parameter, the value ofp and din the method vl be null and 0.0 respectively. (O i this method is called with one parameter, the call wil throw a NulPointerException ‘© i this method is called with one parameter, the call will throw aNulPointerExcepton only ithe code in the ‘method ties to access p. “© sf this method is called with two parameters, the code wil not come. ‘Add Note Previous Next Review Discuss {= G2 Working with ov Data Types: Foundation TimeLeft - 021053 x 117 |of76 aio: (enthuwareocaip..va2.1817| hide sectiortoughness Cvark 2s HB erty the vakd members of oolean does. lease select 3 options A parseBoolean(sting } ‘valueoi(boolean ) H parsetoolean(boolean ) Orase 7 Beclean(Eeclean } ‘Add Note Previous Next Review _—Discuss* = O7- Working wth inhertance : Foundation Time Left -02 1018 x (18 |of 76 aio (enthuwareocap..va2.1087| hide sectiortoughness Cvark 2s HB ‘an averting method must havea same parameter Ist ané the some rem hpe a5 that othe overridden meshod. Please selec option owe (O False, dd Note Previous Next Review _—Discuss* = O7- Working withinhertance : Foundation Time Left 02 1000 x 219 |of 76 am: [enthuware ain 2.1203 hide sectiortoughness Cvark 2s HB ‘Amethod with no access modifier canbe overdden by a method! marked protected (assuming hati is nat fina. Please selec option owe (O False, dd Note Previous Next Review Discuss {= 09 Working wih nv AP String, SngBuider + Foundation Time Le 02.0338 x 20 |of 76 a1: (enthuware caipiv.2 955 hide sectiortoughness Cvark 2s HB Consider the flowing clas. ‘chess HuSering extends Serial Mysesing(){ supe=()s ' ‘The above code wll net compile. lease select 1 option @ we O Fase dd Note Previous Next Review _—Discuss* Drag and Drop Viewer Complete the code using blue labels on the right 0 that the output will be 210. (You may leave some blanks emst.) 2 public clase Undater C © GRIBEREEEEEE uptace (ine a, inc offeee) 6 i 7 aaa 3 > public void uuupdate(2, 232), public static void main(Sering[] args) t 1 Updater u = new Updater (); 5 systen.out_printla(a) > Ok Reset Shawty anawer sha 7 Drag end Drop Viewer Given the definitions of 1 and Klass, complete the definition of Subclass so that ‘antende from Klace and implements 1. Use minimum number of clements. interface I ‘ oid mic): > ‘ void mii) ( 3} ) des swe Eo Gee ( Ox Reset shownty answer show Cowract Answer 02 -Wosng wth i et Types: Foundation TimeLet- 0352 x 025 |of 70 a1: [enthuware ocaipivs.2.1314 hide sectiortoughness Cvark 2s HB hic statements concerning eanversin are rue? Please selec 4 options A conversion rom char to long does net need a cast. ‘Conversion from byte to shart does not need a cast EZ] Conversion from shart to char needs a cast. conversion from int to float needs a cast. [T1 Conversion from byte, char or short to int, long or float does not need a cast Add Note Previous Next Review Discuss = 0b Working wih Methods + Foundation Time Left 020243 x 24 |of 76 a1: [enthuwarecaipiv.2.1053] hide sectiortoughness Cvark 2s HB Compared to nubl protected and private accessbity, defautaccessibity i. lease select 1 option © Less rastictive than public (O More restretive than public, but les restrictive than protected. (O More restrative than protected, but less restrictive than private. (O More restritive than private, 9 Las ert than rotated rom within a package, and more ete than protected rom oud 2 dd Note Previous Next 02 -Wosng wth i et Types + Foundation TimeLet- 020138 x 0 25 of 76 a10: enthuwareoeaip..va2.1081 hide sectiortoughness Cvark 2s HB hit of the folowing snot a prime data vale in va? Please select 2 options ae Ore Biv. Cl enece Crass ‘add Note x Previous Next Review Discuss = 0b Working wih Methods + Foundation Time Left 02002 x 25 |of 76 a1: (enthuware cain 2.965 hide sectiortoughness Cvark 2s HB Select the correct order of restrctveness for access modifies. (First one should be least restretive) lease select 1 option (O public < protected < package (Le. ne modifier) < private © public < package (ie. no modifier) < protected < private (O public < protected < private < package (ie. ne moder) (O protected < package (i.e, no modifier) < private < public (© depends on the implementation ef the dass or method. Add Note Previous Next Review _—Discuss* {= 02 - Working with ova Dota Types: Foundation Time Left - 015313 Q 27 of 78 GID: enthuware.ocaip.ive.2.1159| Dnide section/roughness What happens when you try to compile and run the following dass. public ctass Zesrciass/ public otarac Yous aatn(strina|] ange) trove Exceptiont ant a = Integer. MIM VALUE: ‘syscen.cut.peincin( at" “4b) Please select 1 option © tthrows an ovesricuexcectzen, (© Ie will print twa same negative numbers. (O it wil print two diferent negative numbers. (© twit print one negative and one postive number of same magnitude. ‘O twill print one negative and one postive number of diferent magnitude. ‘Add Note Previous Next Review _—Discuss* x Omak 0 23 = 05- Using Loop Constructs: Founcaton TimeLe-o15757 Q 28 of 78 GID: enthuware.ocaip.iv8.2.916) Consider the folowing code wntten by 3 new developer: veil (teme) YisdAstional valid code EE (1sbane[)) break ' what can be done to make this code more readable? Please select 1 option (Ouse a for loop (O Use the enhanced for lop x Dtide sectiorytoughness mark 0 23 I~ © use do-while instead of while. (O Use continue instead of break. Add Note Previous Next Review Discuss {= 02- Working with ove Dota Types: Foundation Time Left - 01:55:09 x Q 29 0f 78 GID: enthuware.ocaip.ive.2.975 Tnide sectioryroughness mark O as BE * In which of these variable declarations, will the variable remin uninitialized unless explictyintiaized? lease select 1 option (© Declaration ofan instance variable of tye int. (© Declaration ofa static ass vanable of type fost. © Declaration of a lacal variable of type flat. ‘© Declaration ofa static dass variable of dass Objet © Declaration of an instance variable of dass Object. Add Note Previous Next Review _—Discuss* ) Drag and Drop Viewer x Given the following declarations, identify which statements will return true or false. Integer it fase 30 4. H.equals(i2) Exception a runtime 5. H.equals(g1) 6. i1.equals(b1) Ok Resct Shon My Anavar a rg end Drop Viewer 1. String s = nul, ‘Syrtemout pnn(elengehO)) 2. tata = ne ie, 2.3 Identify the exceptions that will be received when the code snippets on the left hand side are executed. 3. Cla fortaret “ove ana. String"); Public clans x Seanet throw new NullDcinterE ception); ArravindexOutOFoundtsception ‘Gxceptionininitinkzereror Ccacatiotroundtecepton ullponterexception No Exception Wil Be Thrown ‘wit ot Comoe = 05 -Uing Opes and Becton Corsa Funatbon Tine let- O416 x 032 |of 76 a1: [enthuware sain ivs.2.1266) hide sectiortoughness Cvark 2s HB hit ofthe flowing statements ae rue? Please selec 3 options The condition expression in an if statement can contain method calls. [pit and b are of tye boolean, the expression (a =) can be used as the condition expression of anit statement, [an if statement can have either an Wf clause or an alse’ clause. (D1 The statement: if (false) ; else; fs egal ‘Only expressions which evaluate to a boolean value can be used as the condition in an i statement dd Note Previous Next Review _—Discuss* 06 Wong with Metods + Fomésion Time x 233 |of 76 a10 (enthuwareoeaip..va2.1362 hide sectiortoughness Cvark 2s HB \Wihich ofthe following statements are true? lease select 2 options private keyword can never be applied to a dass. synchronized keyword can naver be applied to a dass. synchronized keyword may be applied to 2 non-primitive variable. final keyword can never be applied to 2 dass. FA final vanable can be hidden in a subdass. Add Note Previous Next Review _—Discuss* = 0b Working wih Methods + Foundation Time Left 0-219 Q 34 of 78 GID: enthuware.ocaip.ive.2.1283 x Dtide sectiorytoughness mark 0 23 I~ ‘hat isthe correct decoration for an abstract methad ‘ade in a dass thatis accessible to any cass, takes no arguments and retums nothing? lease select 1 option O mublic vena saa): (O apecrace aati (O aperract mut asain O abetract puise vora aati | © spoceact puniie vous ads() chzove Exceotzony ‘Add Note Previous Next Review —_Discuss* = 06- Constictrs: Foundation Time e681 x 35 |of76 a1: [enthuware cain 2.655 hide sectiortoughness Cvark 2s HB whic of the flowing are true about the “eefou” constructor? Please selec option @ ris provided bythe compl ony ifthe dass and an of te super acces doesnot define any constructor (© It takes no arguments. (Oa dea consvuctr i used to retum a dea vale O To define a default constructor, you must use the default keyword. (O Wis aay publ. ‘Add Note Previous Next Review _—Discuss* = 09 Working with ove AP\~ Time Left 01735 x 35 |of 76 a10 (enthuwareoeaip..va2.1827 hide sectiortoughness Cvark 2s HB Whit ofthe folowing classes should vou use to represent usta date without ary ie or zone information? Please selec option 0 iovautitoate O savasg.date @ javatime date (O jevastime.Localbate dd Note Previous Next Review _—Discuss* = 06- Constructors: Foundation Time Le 019559 x 37 |of 70 a1: [enthuware.oaipivs.2.1216 hide sectiortoughness Cvark 2s HB \hien ofthese statements are rue? lease select 2 options lal dasses must explicitly define a constructor. [Aconstructor ean be declared pavate. [A constructor can declare a return value. 1A constructor must intiaize all the member variables ofa class EA constructor can access the non-static members of 2 class. Add Note Previous Next Review _—Discuss* i = 0b- Constructors: Foundation Tie Le 019526 x 38 |of 76 a1: (enthuwareoeaip..va2.1102 hide sectiortoughness Cvark 2s HB Under what stustions does a dass get a defaut constructor? lease select 1 option Qalldasses in Java get a default constructor. (© You have to define at laast one constructor ta get the default constructor. @ the dass does not define any constructors expltly. (O al classes get default constructor from Object dass. (O None of the above, Add Note Previous Next Review _—Discuss* = 05 Ving Loop Cnsbucs Fandtbon Time le -o13529 x 0 35 |of 76 aio: enthuwareoeaip.iva.2.1261 hide sectiortoughness Cvark 2s HB hit of the folowing staremens regarding ‘break’ and ‘continue’ are true? Please selec option © break without 2 label, can occur only in a switch, while, do, or for statement. @ continue without a label, can occur only in a switch, while, do, of for statement. (O break can never occur without alabel. (O continue can never occur WITH a label. (O None of the above, Add Note Previous Next Review _—Discuss* = 09- Lombde pressions + Foundstion Time Left 01380 x 0-40 |of 76 ato: [enthuware cain ivs.2.1466) hide sectiortoughness Cvark 2s HB hit ofthe folowing starements ae correct regarding 3 funetional interface? lease select 1 option © sthas exaey one method and it must be abstract. (© thas exactly one method and ft may ar may not be abstract ‘O st must have exactly one abstract mathod and may hiave other default or static methods. ‘O ir must have exact one static method and may Rave other defaule or abstract methods. dd Note Previous Next Review Discuss = 05- Using Loop Constructs: Founcaton TimeLe- O11 x 1 |of 70 a1: [enthuware oaipive.2.1013] hide sectiortoughness Cvark 2s HB Using a breakin 3 while loop causes the loop to break the current iteration and start the nest iteration of the too, lease select 1 option Ome © Fase dd Note Previous Next Review _—Discuss* | = 03- Using Operators ana Decison Constructs + Foundation Time et O18019| x 042 |of 70 a10: (enthuwareocaip..va.2.1357 hide sectiortoughness Cvark 2s HB \Wiich ofthese combinations of switch expression types and case label value types are legal within a swith statement? lease select 1 option CO cewitch expression of type int and case label value of type char. (O switch expression of type float and case label value of type int (O sewitch expression of tye byte and case label value of type float. © switch expression of tyne char and case label value of type byte. (O sswitch expression of type boolean and case label value of type boolean. ‘Add Note Previous Next Review _—Discuss* OF Ceting and Ung Ary Foundation Tne et -02820 x 045 |of 76 a10: (enthuwareocaip..va.2.1387 hide sectiortoughness Cvark 2s HB erty correct statements about a two dimensional aay Please select option 6 Biss 2 rectangular matrix where numer of rows and numberof columns may be differant but each row ‘or cach column have the same number of ckaments (OTIS tke a square matrix where number of rows and numberof colimns are seme and each row or each column have the same number of elements. (O The number of rows and columns must be spaciiad atthe time itis dedared. @ iis basicaly an aray of arays. ‘Add Note Previous Next Review Discuss = 09 Working wih nv AP Sting, Srnguider + Foundation Time Lee -012883 x (44 |of 70 a1: [enthuware.oaipiv.2.1336) hide sectiortoughness Cvark 2s HB \hien ofthese methods ate not a pat ofthe Stang dass? lease select 1 option Orem O tense O conse, © saoncoas (O severoe dd Note Previous Next Review _—Discuss* = O7- Working withinhertance : Foundation Time Left 012628 x (45 |of 76 a1: [enthuwarecaipiv.2.636 hide sectiortoughness Cvark 2s HB hic of the flowing statements are corre? Please select 3 options (Clan abstract dass can be extended by an abstract or a concrete dass. ‘A concrete class can be extended by an abstract ora concrete class. {an interface can be extended by another interface. [An interface can be extended by an abstract class. Jan interface can be extended by a concrete dass. (Tan abstract dass cannct implement an interface dd Note Previous Next Review _—Discuss* = OB Handling Excepbons + Founcaton TimeLe- 012530 Q 45 0f 78 GID: enthuware.ocaip.ive.2.1034 \What will the following program print when run? public class Tescclass| public static void main(Scring|] args) | yt ‘Syavenvexst(0)? ) zinanty( ) , I lease select 1 option (© 2ewillorine “nally is always executed” @ ie will not compile as there is no catch blodk (© 2ewill not print anything. (Oar excention wil be thrown (O None of the above, Add Note Previous Next Review Syevem.cut.princin(“finaily 12 aivays exscutea!"); x Dtide sectiorytoughness mark 0 23 I~ Discuss = O7- Working wthinhertance : Foundation Time Left 01:2617 x 047 |of 70 aio: (enthuwareocaip..va2.1035 hide sectiortoughness Cvark 2s HB hit ofthe folowing statements ae rue? Please select 2 options The extends keyword is used to specty inheritance. TD subdass of a non-abstract dass cannot be dedared abseeact. TD subdass of an abstract cass can be decared abateace. | subdass of a final dass cannatbe szsteace. C1 Addass, in which all the members are dedared eesvsce, cannot be declared puzise, dd Note Previous Next Review _—Discuss* {= 03 - Using Operters ana Decision Constructs + Foundation Time eft OK2304 x (48 |of 70 a1: [enthuware cajpiv.2.573] hide sectiortoughness Cvark 2s HB hic operators wit aways evaluate athe operands? lease select 2 options Des o1 OW a: oe ‘Add Note Previous Next Review _—Discuss* = 09- Lombde pressions + Foundation Time Left 012216 x (45 |of 70 am: [enthuware.aipive.2.1470 hide sectiortoughness Cvark 2s HB Wich othe flowing are comect about java.usth function. Pedicase? Please select 1 option {tis an interface that has enly one abstract method (among other non-abstract methods) with the (© signature - public vata ceat(r ©) {is an interface that has enly one abstract method (among other non-abstract methods) with the (© signature - public bootean test(t 1) {tis an abstract dass that has only one abstract method (among other non-abstract methods) with the © signature - public absteact void rest(T 2 {tis an abstract dass that has only one abstract method (among other non-abstract methods) with the O signature iblic abstract boolean eest(? #); ‘Add Note Previous Next Review _—Discuss* {= 03 Using Operters ana Decision Constructs + Foundation Time Let - O21 x 50 |of 76 a1: [enthuware.aipiv.2.1084 hide sectiortoughness Cvark 2s HB whic af the Flowing are vad operators in 8¥8? lease select 4 options a o- ae Bx as ‘Add Note Previous Next Review _—Discuss* = 0B Handling Exceptions ; Founcaton TimeLer -OV1857 x 51 of 76 a1: [enthuware cain iv 2.1193 hide sectiortoughness Cvark 2s HB jects of which ofthe following clases canbe thrown using a throw statement? Please select 3 options Clevent © Object a Trowable © Exception CJ RuntimeException ‘Add Note Previous Next Review _—Discuss* = OB Handling Excepbons + Founcaton TimeLe- 012530 Q 45 0f 78 GID: enthuware.ocaip.ive.2.1034 \What will the following program print when run? public class Tescclass| public static void main(Scring|] args) | yt ‘Syavenvexst(0)? ) zinanty( ) , I lease select 1 option (© 2ewillorine “nally is always executed” @ ie will not compile as there is no catch blodk (© 2ewill not print anything. (Oar excention wil be thrown (O None of the above, Add Note Previous Next Review Syevem.cut.princin(“finaily 12 aivays exscutea!"); x Dtide sectiorytoughness mark 0 23 I~ Discuss = 0B Handling Exeepbons + Founcaton TimeLe- OW 1934 x Q 51 0f 78 GID: enthuware.ocaip.ive.2.1133| Tnide sectioryroughness mark O as BE * Objects of which ofthe following classes can be thrown using 2 throw statement? Please select 3 options event Object Ea Throwable ‘Add Note Previous Next Review _—Discuss* = 06 Constructors: Foundation Time Le 117236 x Q 52. 0f 78 GID: enthuware.ocaip.ivs.2.1116| Tnide sectioryroughness mark O as BE * Which ofthe following are true about the “defauit” constructor? lease select 2 options Attic provided by the compli only ithe dase does not define any constructor. Liintiatzes the instance members of the dass. [Lit calls the no-args constructor of the super dass. [it intiatizes instance as well as cass fields ofthe dass. itis provided by the compiler if the class does net define a no-args constructor. Add Note Previous Next Review _—Discuss* = 09 Working with nv AP String, SngBuider + Foundation Time Le O67 x 055 |of 70 a1: [enthuware cain iv 2.1369 hide sectiortoughness Cvark 2s HB Infava, stings ore immutable. A irectimpleation of ii lease select 2 options you cannot call methods tke "1234" replace(1, ‘97; and expec to change the original sting you cannat change a string object, once tis created. you can change a String object only by the means ofits methods. D1 you cannot extend string class, D you cannot compare String objects. Add Note Previous __Next__Review _ Discuss 06 Handing eps: Foundtbon Tne Let OFI5N6 x 54 |of 76 a1: [enthuware cajpiv.2.665 hide sectiortoughness Cvark 2s HB What can be the type of a catch argument Please select 1 option O Any dass that extends ava.tang.t2cercion (O Any dass that extends yava.tang.tucsption exept any dass that extends java. ang.Runcinetucestion © Any dass that 2 Marcwante. (O Any Object (O Any dass that extends Error Add Note Previous Next Review _—Discuss* = 03- Using Operters ana Decison Constructs + Foundation Time et O11 x Q 55. 0f 78 GID: enthuware.ocaip.ive.2.932 Tnide sectioryroughness mark O as BE * Which ofthe following statements are true? lease select 2 options [U1 The modulus operator % can only be used with integer operands. [1 & can have integral a well 35 boolean operands. [The arithmetic operators, / and have the same level of precedence. (Ha can have integer as wall as boolean operands, 1 ~ can have integer as weil as boolean operands, dd Note Previous Next Review _—Discuss* = 05- Using Loop Constructs: Founsaton TimeLe- 011203 x @ 56 of 78 OID: enthuware.ocaip.ivs.2.1352| (nide section/rouchness Omark O as BE * Using a consanse in a while loop causes the loop to break the current iteration and start the nest iteration of the loop. please select 1 option Ome © False Add Note Previous Next Review Discuss = O}-JovnGasicr + Foundstion TimeLeft - 011799 x @ 57 of 78 OID: enthuware.ocaip.ivs.2.867 (nide section/rouchness Ouark O as EM Which of the following keywords may occur muti times in a Java source fle? Please select 4 options ease © private UO package © public Add ote E Previous Next Review Discuss = 05 -Uing Opies nd Decton Crs Fundtbon Tine leh- O2 x (58 |of 78 ci: (enthuwarsoeain..v8.2.1317 Chie sectionTouchness marke Os HB Which of the following are NOT valid operators in Java? Please select 4 options sizeot Bex Tiinstanceot mod equate Add ote E Previous Next Review Discuss 06 Handing cepts: Foundibon Tine Leh G1@521 x 0 59 |of 76 a10 enthuwareoeain..va.2.1295 Chie sectiortoushness Cart 2s MBC 'A.2va programmer is developing a deskton application, which ofthe folowing exceptions would be Appropriate for him to throw explicitly from his code? lease select 1 option O wanizosncerexception O classcascencepticn O arrayindesoucoracundsException O secepsian| © socissasecrouatezor Previous Next Review Discuss = 03- Using Operators ana Decison Constructs + Foundation Time et O00 x 60 of 7¢ GID: enthuware.ocaip.iv8.2.953) Oihide section/roughness. Care Cas i * Which of the folowing are also known as “short circuiting logical operators"? Please select 2 options ws Oo Cas Al o- Add Note Previous Next Review _—Discuss* = 0} Jovn Basics + Foundstion TimeLeft - 0078 x @ 81 of 78 OID: enthuware.ocaip.ivs.2.1020| (nide section/rouchness Ouark O as EM What does the zeroth element ofthe sting array passed to the standard main method contain? Please select 1 option O The name of the cass. (O The string "java (O the number of arguments. (O The fist argument of the argument ist, Fpresant. © none of the above, ‘Add Note ¥ Previous Next Review Discuss = OB Handling xceptons + Founcaton TimeLe- O51 x Q 82 of 78 OID: enthuware.ocaip.ivs.2.1033| (nide section/rouchness Ouark O as EM ‘Autry statement must always have a waren associated with i. Please select 1 option eter O throws O finaly (OQ eateh, finally or both O throw ‘Add Note ¥ Previous Next Review _Discuss* {= 0} Java Basics + Foundstion TimeLeft 00513 x @ 83. of 78 OID: enthuware.ocaip.ivs.2.1336) (nide section/rouchness Ouark O as EM \What isthe correct parameter specification for the standard main method? Please select 2 options O vos ED scringt 1 args CD seringe aot 1 Di sering args ED scring ergot | Previous Next" Review Discuss Ge 07 Wing wihinhetance: Foundton Tne eh O1505 x 054 of 78 a10 enthuwareoeaip..v8.2.1135 Chie sectiortoushness Cart 2s MBC Which ofthe following statements is/are rue? lease select 1 option © Subdasses must define all the abstract methods that the superclass defines. @ A cass implementing an interface must define all the methods of that interface, ‘OA dass cannot override the super dass's constructor. O itis possible for two classes to be the superdiass of each other. (O An interface can implement multiple interfaces. ‘Add Note ¥ Previous Next Review _—Discuss* = 09 Working with ove AP)~ Time Left -00827 x 255 of 76 010 enthuware ea .va2.1835 hide sectiortoughness Cvark 2s HB erty the comet statements. lease select 1 option O tocelbate, LecalTane, and LocalbeteTane extend Date. (© socaipace, Lecaitans, and cecaipatersae implement Texporaiacceaser. © Both - rscaipace and Loeattine extend zocaiDaceraze, which extends gava.ueai. Daze. (O socaipace, Leeaitane, and cocaupateraae implement Texporauacceasor and extend yava.utai.oave. ‘add Note Previous Next Review _—Discuss* {= 02 Working with ova Dota Types: Foundation TimeLeft - 01.0249 x (55 |of 76 a1: (enthuware ocajpivs.2 955] Chie sectiortoushness Cart 2s MBC Consider the flowing code: public class Conversion{ ‘public scatic void mata(Sceing{] 2238) sleet £ =: Systemout.princin(s ~ (int) , ' ‘what wilt print when run? lease select 1 option O sew print (© tewill not print 0. © tewillnot compile, (O it willthrow an exception at runtime. (O None of the above, ‘Add Note ¥ Previous Next Review _—_—Discuss* [Diag and Drop Viewer ® Identify the exceptions that will be received when the code snippets on the left hand side are executed. { Gemrcontinccion Arrayindexowofboundetcaption ic a flee return factorial} ? ecume that alla wth» sry big integer. oid prntteObiett oat “erfme oy tom lange ++) AO] moierenception ‘Syatemovtarintin(oal De > Fessinethat ical! ae such: pital) No Exception Wile Thrown. ibe Ok _Resst_—_ Showy Arener__ShowSorselanner Ge 07 -osing withinhetane: Feundton Tne et -005601 x (58 |of 76 a10: enthuwareoeain..va2.1147 hide sectiortoughness Cvark 2s HB Gwen the folowing code, which statements are true? class AL ' ‘clase 8 extends a| ane a ' Please select 3 options (Class @ extends cass, (H ciass 8 isthe cuperdass of dass A. clas inherits from cass 8 [Class is = subclass of class A. objects of dass 8 wil always have a member variable named. ‘Add Note Previous Next Review _—Discuss* = O7- Working wthinhertnce : Foundation Time Left -095642 x @ 89 of 78 OID: enthuware.ocaip.ivs.2.1300| Cnide sectior/rouchness mark O as BE * ‘An abstract method cannot be overridden, Please select 1 option OTe © Fate ‘Add Note Previous Next Review _—Discuss* = O7- Working withinhertance : Foundation Time Left -005358 x 70 |of76 a1: [enthuware.aipivs.2.1064 Chie sectiontoushness Cart 2s HB consider tis code: sncentace 111 ) snceztace 32/ } clase ACT ‘class 8 extends A inplenencs HL{ } Glass C extends B iapleneses 22[ ba = new DQ: ' uae 0 ‘Which ofthe following statements are true? Please select 3 options Ovises, Dehasan. Eicisaxt cise ‘Add Note Previous Next Review _—Discuss*

You might also like