Questions
ayuda
option
My Daypo

ERASED TEST, YOU MAY BE INTERESTED ONSS_Java_T1_2021_Choose

COMMENTS STATISTICS RECORDS
TAKE THE TEST
Title of test:
SS_Java_T1_2021_Choose

Description:
SS_Java_Term 1 Cho

Author:
samehmsamir@yahoo.com
(Other tests from this author)

Creation Date:
17/09/2021

Category:
Others

Number of questions: 35
Share the Test:
Facebook
Twitter
Whatsapp
Share the Test:
Facebook
Twitter
Whatsapp
Last comments
No comments about this test.
Content:
The System class is imported by default in any java program because it is in ……… package. java.lang java.util java.math javafx.geometry.
………. is a correct comment form. */…/* */*…*/* ///…/ {…}.
An identifier (name) for a variable, method or class must not start with ……….. underscore (_) dollar sign ($) Letter (A…Z, a…z) digit (0…9).
.......... is not a correct variable type. float short byte real.
To declare a named value as constant, you must use the keyword ……… before its name. const final static readonly.
........ is numeric data type of two-bytes width for storing integers. byte short int long.
An integer literal (value) is assumed to be of the ……… type. byte short int long.
A real floating-point literal (value) is assumed to be of the ……… type. float double decimal real.
………. is the escape character used for printing TAB on the console. 't' 'T' '\t' '\T'.
double a = 6.5; System.out.println(a += ++a); prints ……. 13.0 14.0 15.0 16.0.
The value of variable x after executing: int x = 3 * 4 – 2 * ( ( 2 + 10 ) / 2 ) – 2; is ……….. 58 -2 40 -12.
int x = 2; System.out.println(++x + 13 + x++); prints ……….. 17 20 16 19.
int sum = 0; sum += 4.5; sum += 4.5; System.out.println(sum); prints ……. 9.0 9 8.0 8.
The following expression: a = b += c = d is equivalent to the expression: ………. a = (b += (c = d)) a = ((b += c) = d) ((a = b) += c) = d (a = b) += (c = d).
The ………. follows the case keyword in the switch statement. ; (semicolon) – (dash) : (colon) , (comma).
The syntax: ………. is required to end each case in the switch statement structure. end; break; stop; return;.
Math.rint(−2.5) returns ……….. -2 -2.0 -3 -3.0.
To get random lowercase letter in the ASCII range 97-122, you must use this expression: ………. (char)(((int)(97 + Math.random())) * 26); (char)(97 + ((int)(Math.random())) * 26); (char)(97 + (int)(Math.random() * 26)); (char)(97 + (int)(Math.random() * 25));.
Class ……… is responsible for storing and handling text data. String Scanner Math System.
"abc".compareTo("abg"); returns ……….. 4 -4 4.0 -4.0.
To extract the substring "to" from String msg = "Welcome to Java"; you must write: ……….. msg.substring(7, 9) msg.substring(7,10) msg.substring(8, 9) msg.substring(8, 10).
"Welcome to Java".indexOf('o',5); returns ……….. 4 5 9 10.
"Welcome to Java".lastIndexOf("Java",5); returns ……….. 11 12 0 -1.
int i = 1; while (i < 10); System.out.print(i); prints ………. nothing 1 123456789 10.
int i = 1; do { System.out.print(i); i++; } while(i > 10); prints ………. nothing 1 123456789 10.
The final value of variable x after running: int x; for (x = -5 ; x < 6 ; x += 3) {} is ……….. 7 6 5 4.
The while loop is guaranteed to execute ………. time(s). 0 1 2 Infinitely.
int i = 1; while(i < 10) if(i%2 != 0) continue; System.out.print(i); i++; prints ……… 1 2468 10 nothing.
String[] strArray = {"hany","ali"}; System.out.print(strArray); prints ………. hany hanyali address of the array in the heap stored in reference variable named strArray will not compile because of syntax error.
char[] city = {'D', 'a', 'l', 'l', 'a', 's'}; System.out.print(city); prints ……… D Dallas address of the array in the heap stored in the reference variable named city will not compile because of syntax error.
int[] list={1,2,3}; for(int i=0; i<=list.length; i++) System.out.print(list[i]+" "); has ……… error. syntax runtime logic no.
int[] list={1,2,3}; for(int i=0; i<list.length(); i++) System.out.print(list[i]+" "); has ……… error. syntax runtime logic no.
int[] list={1,2,3}; for(int i=0; i<list.length-1; i++) System.out.print(list[i]+" "); has ……… error. syntax runtime logic no.
The index number of the last element of an array with 30 elements is ………. system-defined programmer-defined 30 29.
The syntax: ………. correctly declares an array called x. int[] x; array[] x; int{} x; array{} x;.
Report abuse Consent Terms of use