MCQ 11 MarkWhich value is returned if the value of an element given in binary Search () method is not found in an array?✓-1B0C1D Index PositionAnswerCorrect option: A. -1-1View full question & answer→
MCQ 21 MarkWhich value is returned if the value of an element given in binary Search () method is found in an array?A —1B0C1✓ Index PositionAnswerCorrect option: D. Index PositionIndex PositionView full question & answer→
MCQ 31 MarkIs array name a reference variable referring to memory location where its elements are stored?✓ YesB NoC Depend on the type of an arrayD Depend on the length of an arrayAnswerCorrect option: A. YesYesView full question & answer→
MCQ 41 MarkArray is treated as an object of the following class.✓ ArraysB DC 1-DD Java ArraysAnswerCorrect option: A. ArraysArraysView full question & answer→
MCQ 51 MarkBy using which of the following array of arrays can we practically get multi- dimensional arrays?✓ 1-DB 2-DC 3-DD All of theseAnswerCorrect option: A. 1-D1-DView full question & answer→
MCQ 61 MarkWhich type of array does Java support basically?✓ 1-DB 2-DC 3-DD All of theseAnswerCorrect option: A. 1-D1-DView full question & answer→
MCQ 71 MarkWhat is used to have collection of variables of same data type?A String✓ ArrayC LiteralD PackageAnswerCorrect option: B. ArrayArrayView full question & answer→
MCQ 81 MarkWhich of the statement is intended to check whether the time of Calendar object of Calendar class is of morning or not?✓ if (Calendar. Get(Calendar1.AM_PM) = =0)B if (Calendar. Get(Calendar1.AM_PM) = = 1)C if (Calendar. Get(Calendar1.AM_PM) = 0)D if (Calendar. Get(Calendar1.AM_PM) = 1)AnswerCorrect option: A. if (Calendar. Get(Calendar1.AM_PM) = =0)if (Calendar. Get(Calendar1.AM_PM) = =0)View full question & answer→
MCQ 91 MarkWhat will be set by execution of call “Calendar.Set (Calendar.Date,20)” if Calendar is an object of Calendar Class?✓ Date 20B 20th day of yearC Second 20D None of theseAnswerCorrect option: A. Date 20Date 20View full question & answer→
MCQ 101 MarkBy using which of the following method we can set the values of field constant for Calendar class?A display ()B show ()✓ set ()D craw0AnswerCorrect option: C. set ()set ()View full question & answer→
MCQ 111 MarkWhich of the following is a subclass of Calendar class?✓ Gregorian CalendarB CalendarC CalendarD None of theseAnswerCorrect option: A. Gregorian CalendarGregorian CalendarView full question & answer→
MCQ 121 MarkWhich kind of names are given to the constants defined in Calendar class?A MeaningfulB Self-explanatory✓ a and b bothD None of theseAnswerCorrect option: C. a and b botha and b bothView full question & answer→
MCQ 131 MarkWhich information can be extracted by Calendar class of java.util package of Java?A Year, Month, DateB Hour, Minute, Second✓ a and b bothD User’s nameAnswerCorrect option: C. a and b botha and b bothView full question & answer→
MCQ 141 MarkWhich of the following classes is provided in java.util package?A DateB TimeC Calendar✓ a and b bothAnswerCorrect option: D. a and b botha and b bothView full question & answer→
MCQ 151 MarkDate () method is stored in datel1 variable. Which statement is used to present current date and time as string?✓ date1.toString()B date1.Tostring()C date1.date()D date1.getTime()AnswerCorrect option: A. date1.toString()date1.toString()View full question & answer→
MCQ 161 MarkDoes the Date class of Java represent the value up to precision?A SecondB Micro secondsC Minute✓ Mili secondsAnswerCorrect option: D. Mili secondsMili secondsView full question & answer→
MCQ 171 MarkWhich of the following Java class encapsulate both date and time?✓ DateB TimeC Date timeD new DateAnswerCorrect option: A. DateDateView full question & answer→
MCQ 181 MarkWhich package of Java library provides Date class?✓ java.utilB java.langC java.ArrayD java.dateAnswerCorrect option: A. java.utiljava.utilView full question & answer→
MCQ 191 MarkWhich of the following statements is used to know the number of characters of variable Str?✓Strength ()BStrength {}CStr.len()DStr.getLength()AnswerCorrect option: A. Strength ()Strength ()View full question & answer→
MCQ 201 MarkWhich of the following method of String class is used to convert a string into an array of bytes?✓ get Bytes ()B Bytes ()C get bytes ()D Convert bytes ()AnswerCorrect option: A. get Bytes ()get Bytes ()View full question & answer→
MCQ 211 MarkBy using which methods of String class can we determine the length of string?✓ length ()B Len()C Charlene ()D Length ()AnswerCorrect option: A. length ()length ()View full question & answer→
MCQ 221 MarkBy using which methods of String class one can know the number of characters of a string?✓ length ()B Len()C Charlene ()D Length ()AnswerCorrect option: A. length ()length ()View full question & answer→
MCQ 231 MarkTo perform which of the following operation String class of Java does not provide any method?A To compare two stringsB To concatenate two strings✓ To reverse stringD To split a stringAnswerCorrect option: C. To reverse stringTo reverse stringView full question & answer→
MCQ 241 MarkWhile using which of the following we need to use ()?✓ String objectB ArrayC ByteD CharacterAnswerCorrect option: A. String objectString objectView full question & answer→
MCQ 251 MarkWhat is length for String object?✓ MethodB ClassC ValueD Attribute or PropertyAnswerCorrect option: A. MethodMethodView full question & answer→
MCQ 261 MarkWhat is length for array variable?A MethodB ClassC Value✓ Attribute or PropertyAnswerCorrect option: D. Attribute or PropertyAttribute or PropertyView full question & answer→
MCQ 271 MarkWhich of the following statement is true to return a string with all characters of Str1 converted to uppercase?A Str1.uppercase()B Str1.touppercase()C Str1.tocapitalcase()✓ Str1.toUppercase()AnswerCorrect option: D. Str1.toUppercase()Str1.toUppercase()View full question & answer→
MCQ 281 MarkWhich of the following statements is true to return a string with all characters of Str1 converted to lowercase?A Str1.LowerCase()✓ Str1.toLowerCase()C Str1.ChangeCase()D Str1.tolowerCase()AnswerCorrect option: B. Str1.toLowerCase()Str1.toLowerCase()View full question & answer→
MCQ 291 MarkWhich of the following methods is for String class?A Converting string into an array of bytesB Converting string into lower case or upper caseC Appending string, copy string or part of string✓ All of theseAnswerCorrect option: D. All of theseAll of theseView full question & answer→
MCQ 301 MarkWhich of the following methods is for String class?A Converting strings, Extracting part of stringsB Searching for characters or patterns in stringC Getting character at specified index position✓ All of theseAnswerCorrect option: D. All of theseAll of theseView full question & answer→
MCQ 311 MarkWhich of the following methods is for String class?A To compare strings, combining stringsB To find length of the strings, splitting substringsC Obtaining substrings✓ All of theseAnswerCorrect option: D. All of theseAll of theseView full question & answer→
MCQ 321 MarkWhich memory location do both the objects refer if they are created using “new” operator in a program?✓ DifferentB SameC TwoD ThreeAnswerCorrect option: A. DifferentDifferentView full question & answer→
MCQ 331 MarkFor which object, separate memory is not allocated if string objects Strl and Str2 are created using same literals but without “new” operator?✓ Str2B Str1C a and b bothD None of theseAnswerCorrect option: A. Str2Str2View full question & answer→
MCQ 341 MarkIf Str1 and Str2 are created without using “new” operator then which variable refers to the same instance as created for Str1?A Variable Stri1B Variable Stri2✓ a and b bothD None of theseAnswerCorrect option: C. a and b botha and b bothView full question & answer→
MCQ 351 MarkWhat is specified by the statement Str1 = = Str2 if Str1 and Str2 are created using “new” operator?✓ It compares the objects of two reference variables.B It compares the content of two reference variables.C a and b bothD None of theseAnswerCorrect option: A. It compares the objects of two reference variables.It compares the objects of two reference variables.View full question & answer→
MCQ 361 MarkWhat is specified if string objects Str1 and Str2 are created using same string literal but without using “new” operator?✓ It compares the content of two reference variables.B It compares the objects of two reference variables.C a and b bothD None of theseAnswerCorrect option: A. It compares the content of two reference variables.It compares the content of two reference variables.View full question & answer→
MCQ 371 MarkWhich of the following statements is true to compare the contents of Str1 and Str2?✓ Str1 = = Str2B Str1 = Str2C Str. Str2D Str1; Str2AnswerCorrect option: A. Str1 = = Str2Str1 = = Str2View full question & answer→
MCQ 381 MarkUsing which operator if string objects are created than separate memory is allocated even if strings are identical?✓ newB byteC charD stringAnswerCorrect option: A. newnewView full question & answer→
MCQ 391 MarkWhich statement is true in reference of memory for second object when two string objects are created using same string literals?✓ Both objects refer to different memory location.B Both objects refer to same memory location.C a and b bothD None of theseAnswerCorrect option: A. Both objects refer to different memory location.Both objects refer to different memory location.View full question & answer→
MCQ 401 MarkWhere are literals stored?A In the Pen driveB In the CD✓ In the MemoryD In the Hard diskAnswerCorrect option: C. In the MemoryIn the MemoryView full question & answer→
MCQ 411 MarkWhen should we use an array of bytes instead of array of characters when following characters are present?A UnicodeB Ansi✓ ASCIID EBCDICAnswerCorrect option: C. ASCIIASCIIView full question & answer→
MCQ 421 MarkWhat should we use instead of array of characters if the characters are ASCII?✓ byteB shortC stringD intAnswerCorrect option: A. bytebyteView full question & answer→
MCQ 431 MarkHow many bytes are used to store characters in Java?A OneB Four✓ TwoD ZeroAnswerCorrect option: C. TwoTwoView full question & answer→
MCQ 441 MarkWhich operator is used in Java to create an object?✓ newB addC createD makeAnswerCorrect option: A. newnewView full question & answer→
MCQ 451 MarkWhich class does Java support to use variables that can store strings?A StringB String Buffer✓ Both a and bD None of theseAnswerCorrect option: C. Both a and bBoth a and bView full question & answer→
MCQ 461 MarkIn which of the following symbols a sequence of characters is enclosed?✓ “ “B ``C ‘‘D \* *\AnswerCorrect option: A. “ ““ “View full question & answer→
MCQ 471 MarkWhat can be considered as 1-D array of characters?✓ StringB CharacterC ArrayD LiteralAnswerCorrect option: A. StringStringView full question & answer→
MCQ 481 MarkWhich of the following is a sequence of characters?✓ StringB ArrayC CharacterD LiteralAnswerCorrect option: A. StringStringView full question & answer→
MCQ 491 MarkWhat is not created by declaring an array without initialization?✓ An array objectB MethodC ClassD VariableAnswerCorrect option: A. An array objectAn array objectView full question & answer→
MCQ 501 MarkWhat can be the size of 2nd, 3rd…. Dimensions of multi-dimensional arrays?A SameB With 5 elements✓ Different(variable)D With 3 elementsAnswerCorrect option: C. Different(variable)Different(variable)View full question & answer→