Strona 1

PPIII

Pytanie 1
Jakie słowo kluczowe umożliwia wywołanie wewnątrz metody konstruktora klasy, w której znajduje się metoda? / What keyword allows you to call, inside the method, constructor of the class in which the method is declared?
Pytanie 2
Które z poniższych instrukcji są poprawne: Which of the following statements are valid: .
A. int i=1/3;
C. double d=999d;
D. float f=1.01;
B. float f=1/3;
Pytanie 3
Jaki będzie rezultat działania programu (jaki tekst zostanie wyświetlony na konsoli)? What will be the executing result of the program (what text will be displayed in the command line window)? class Vehicle { } class Bicycle extends Vehicle { } class Scooter extends Vehicle { } public class Vehicles { public static void main (String [] args) { Vehicle Vehicle = new Bicycle(); if( Vehicle instanceof Bicycle ) System.out.println ("Bicycle"); else if( Vehicle instanceof Vehicle ) System.out.println ("Vehicle"); else if( Vehicle instanceof Scooter ) System.out.println ( "Scooter" ); else System.out.println ("Nothing "); } }
Pytanie 4
Które z wymienionych nazw zmiennych są zgodne z przyjętą konwencją tworzenia nazw: / Which of the following variables are consistent with the naming convention?
color
engine
carMaker
vinNumber
Drive
Pytanie 5
Jaki operator umożliwia tworzenie obiektów? / Which operator allows you to create objects?

Powiązane tematy

#programowanie,java