GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Quiz

Chapter 1: Quiz

Ed Woo 25 Fragen Aktualisiert am 23 Nov 2016

Quiz starten

Fragen in diesem Quiz (25)

  1. 1 In the following code, identify which line is redundant.

    1. import java.lang.String;
    2. import java.lang.*;
    3. public class Foo {
    4. String name;
    5. }
    1. A4
    2. B1
    3. C2
    4. D3
  2. 2Which of the following import statements imports an entire group of classes contained in the java.lang package?
    1. Aimport *.java.lang
    2. Bimport *.java.lang;
    3. Cimport java.lang.*
    4. Dimport java.lang.*;
  3. 3Which path does the Java runtime environment use for searching?
    1. AClass path
    2. BFile Path
    3. CEnvironment path
    4. DSearch path
  4. 4Which of the following will create a package named My?
    1. Apackage My[];
    2. Bpackage My;
    3. Cpack My();
    4. Dpackage My package;
  5. 5Consider the given string:

    Mack John Lisa Maria


    What is the output of the following Java statement?

    System.out.println(args[2]);
    1. ALisa
    2. BMaria
    3. CMack
    4. DJohn
  6. 6For any non-null reference values a and b, which of the following values will be returned by the expression a.equals(b) if b.equals(a) returns true?
    1. Atrue
    2. Bfalse
    3. Cnull
    4. D0
  7. 7In the following code, you need to import the two classes FileInputStream and FileOutputStream.

    public class CopyFile {
    String name;
    }


    What is the best way to import these files?
    1. Aimport java.FileInput Stream;
      import java.FileOutput Stream;
    2. Bimport java.nio.*;
    3. Cimport java.*.*;
    4. Dimport java.io.FileInputStream.*;
      import java.io.FileOutputStream.*;
  8. 8Which two keywords are used for decimal-point value?
    1. Ashort and long
    2. Bfloat and double
    3. Cfloat and long
    4. Dlong and double
  9. 9What is the default initialization value of long variable type?
    1. Afalse
    2. B0
    3. C0.0
    4. Dnull
  10. 10Which of the following represents the correct sequence of these three in a Java application?

    1. package declaration
    2. class definition
    3. import statement
    1. A1, 2, 3
    2. B3, 2, 1
    3. C1, 3, 2
    4. D2, 3, 1

Informationen

Beschreibung
Java I Quiz am Chapter 1: Quiz, erstellt von Ed Woo am 26/07/2016.
Autor
Ed Woo
Sprache
English
Aufrufe
0
Verlauf
Erstellt am 26 Jul 2016 · aktualisiert am 23 Nov 2016
Schlagwörter
java i
Bewertung
Noch keine Bewertungen
Bewerte dieses Quiz
Bewerte dieses Quiz

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck