Pytania i odpowiedzi

PPIII

Zebrane pytania i odpowiedzi do zestawu.
Ilość pytań: 5 Rozwiązywany: 990 razy
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?
super
Pytanie 2
Które z poniższych instrukcji są poprawne: Which of the following statements are valid: .
A. int i=1/3;
B. float f=1/3;
C. double d=999d;
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 "); } }
Bicycle
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?
carMaker
engine
vinNumber
color
Pytanie 5
Jaki operator umożliwia tworzenie obiektów? / Which operator allows you to create objects?
new

Powiązane tematy

#programowanie,java