What value the variable c will have: int a = 5; int b = 6; boolean c = a<=b; :c1 true :c2 false :c3 error :c1 ok ex -- What value the string will have s: int x = 82; String s = "Your weight is:" + x + "Kg"; :c1 "Your weight is:" + x + "Kg" :c2 Your weight is: 42 Kg :c3 42 :c4 error :c2 ok ex -- What value the string will have s3? String s1 = "jdk", s2 = "7.0"; String s3 = s1 + s2; :c1 s1 + s2 :c2 jdk7.0 :c3 jdk :c4 7.0 :c2 ok ex -- For one-line comment we use characters :c1 ++ :c2 // :c3 -- :c4 ** :c2 ok ex -- What will be the output: int m = 6; System.out.printf ("African elephant weighs %d tonnes", m); :r1 African elephant weighs% d tonnes :r2 African elephant weighs 6d tonnes :r3 The African elephant weighs 6 tons :r4 error :r3 ok -- What value the variable y will have? int x = 1; int y = x++; :r1 0 :r2 1 :r3 2 :r4 3 :r2 ok -- What value the variable a will have? int x=0; int y=5; boolean a = x == 0 && y <= 0; :r1 false :r2 true :r3 chyba :r1 ok -- What value the variable a will have? int x=0; int y=5; boolean a = x == 0 || y <= 0; :r1 true :r2 false :r3 chyba :r1 ok -- What value the variable x will have int x=24; x /= 2; :r1 24 :r2 2 :r3 12 :r4 chyba :r3 ok -- What value the variable y will have? int x = 5; int y = x + ++x; :r1 9 :r2 10 :r3 11 :r4 12 :r3 ok -- It will be written: Int month = 3; Boolean isMay= (month == 5); If (isMay) {System.out.println ("is love time"); } Else { System.out.println ("not May") } :r1 is love time :r2 not May :r3 true :r4 false :r2 ok -- How many times will the cycle work? int x = 5; while( x >= 0 ) { System.out.println( x ); x --; } :r1 0x :r2 2x :r3 3x :r4 4x :r5 5x :r6 6x :r6 ok -- How many times will the cycle work? int x = 5; do { System.out.println( x ); x --; } while (x < 0); :r1 Infinitely many times :r2 0x :r3 1x :r4 2x :r5 5x :r1 ok -- How many times will the cycle work? for( int a = 1; a < 4; a++ ) { System.out.println( a ); } :r1 0x :r2 1x :r3 2x :r4 3x :r5 4x :r6 Infinitely :r4 ok -- How many times will the cycle work? int s = 99; while( s > 0 ) { if( s%10 == 0 ) { break; } s = s-1; System.out.println( s ); } :n :n="9" ok -- What is heredity for? :c1 End (final) methods the extended class inherits but can not overlap :c2 The Parent Class inherits all maternal class methods :c3 The expanded class inherits all non-proprietary methods and class variable ancestors :c4 To create a class hierarchy :c1:c3:c4 ok ex -- What is the method used for?​ :r1 Mathematical calculations :r2 For statistical calculations :r3 Multiple use of the same sequence of commands :r4 To create objects :r3 ok -- What return can be used in methods​ :c1 Immediate end of the method :c2 Returns to the beginning of the code :c3 Returns the value :c4 Returns to the beginning of the method :c1:c3 ok ex -- What value will an array element have with index 3? int[] p = new int[10]; for( int i = 0; i < p.length; i++ ) { p[i] = i+2; } :c1 3 :c2 4 :c3 5 :c4 6 :c3 ok ex -- What value will an array element have with index 3? int[]numbers = { 3, 5, 6, 7}; :c1 3 :c2 5 :c3 6 :c4 7 :c4 ok ex -- What value will an array element have with index p[2][3]? int[][] p = new int[4][4]; for( int i = 0; i < p.length; i++ ) { for( int j = 0; j < p.length; j++ ) { p[i][j] = j; } } :c1 1 :c2 2 :c3 3 :c4 4 :c3 ok ex -- Why we use classes :c1 To create instances :c2 To create objects :c3 Heredity :c4 To define a array :c1:c2:c3 ok ex -- If you use the protected access specifier keyworld. Which classes will be able to access fixes and variables? :c1 any class :c2 Access only from the given class :c3 They can access classes of the same package, or from a descendant of the class anywhere :c4 From any class of the same package :c3 ok ex -- What the constructors work for​ :c1 Entering Object Values :c2 Constructs a class :c3 Triggers an instance of the class :c4 From one instance implicitly creates another instance of the class :c1 ok ex -- How many (not inherited) methods will the Employee Object available to? class Employee { public Employee (int age, int wage) { this.age = age; this.wage = wage; } private int age = 1; public int getAge () { return age; } public void setAge(int age) { this. age = age; } private int wage = 1; public int getWage() { return wage; } public void setWage(int wage) { this.wage = wage; } public void introduceYourself(){ System.out.println("My age a wage are " + age + "years "+ wage + "Euros"); } public static void main(String[] args) { Employee employee = new employee (30,100); } } :r1 1 :r2 2 :r3 3 :r4 4 :r5 5 :r5 ok --