Fiszki

PPIII

Test w formie fiszek
Ilość pytań: 5 Rozwiązywany: 990 razy
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
Które z poniższych instrukcji są poprawne: Which of the following statements are valid: .
B. float f=1/3;
D. float f=1.01;
C. double d=999d;
A. int i=1/3;
B. float f=1/3;
C. double d=999d;
A. int i=1/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
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?
Drive
color
carMaker
engine
vinNumber
color
carMaker
engine
vinNumber
Jaki operator umożliwia tworzenie obiektów? / Which operator allows you to create objects?
new

Powiązane tematy

#programowanie,java

Inne tryby