Year 11 Revision Quiz 1

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Margaretbajada
M
Margaretbajada
Community Contributor
Quizzes Created: 1 | Total Attempts: 79
Questions: 10 | Attempts: 79

SettingsSettingsSettings
Year 11 Revision Quiz 1 - Quiz

Answer the following quiz. It is very important that you type in your names to record your final marks.
Good luck!


Questions and Answers
  • 1. 

    What is this in JAVA?A blueprint from which individual objects are created.

    • A.

      Class

    • B.

      Method

    • C.

      Statement

    Correct Answer
    A. Class
    Explanation
    In Java, a class serves as a blueprint from which individual objects are created. It defines the properties and behaviors that the objects of that class will have. By creating objects from a class, we can access and utilize its attributes and methods. Therefore, the correct answer is "class".

    Rate this question:

  • 2. 

    What is this in JAVA?An instance of a class.

    • A.

      Attribute

    • B.

      Method

    • C.

      Statement

    • D.

      Object

    Correct Answer
    D. Object
    Explanation
    In Java, an object refers to an instance of a class. It is a fundamental concept in object-oriented programming where classes are used to define the blueprint for creating objects. Objects have their own set of attributes and behaviors defined by the class they belong to. They can be instantiated using the "new" keyword and can interact with each other through method calls. Therefore, an object is the correct answer as it represents an instance of a class in Java.

    Rate this question:

  • 3. 

    What is this in JAVA?Describes an action that can be carried out on or by an object.

    • A.

      Constant

    • B.

      Method

    • C.

      Class

    • D.

      Attribute

    Correct Answer
    B. Method
    Explanation
    A method in JAVA is a block of code that defines an action that can be performed on or by an object. It encapsulates a series of statements that can be executed when the method is called. Methods are used to perform specific tasks and can have parameters and return values. Therefore, the given correct answer, "Method," accurately describes an action that can be carried out on or by an object in JAVA.

    Rate this question:

  • 4. 

    How would you call a method called ‘showSquare’ for an object called yellowSquare?  

    • A.

      YellowSquare.showSquare();

    • B.

      ShowSquare.yellowSquare();

    • C.

      ShowSquare();

    • D.

      YellowSquare.show();

    Correct Answer
    A. YellowSquare.showSquare();
    Explanation
    To call a method called 'showSquare' for an object called yellowSquare, we use the dot notation. The correct syntax is yellowSquare.showSquare(); This syntax indicates that we are calling the method 'showSquare' on the object 'yellowSquare'.

    Rate this question:

  • 5. 

    From which method does the execution of a Java application start?  

    • A.

      Public static void

    • B.

      String args[]

    • C.

      Main method

    Correct Answer
    C. Main method
    Explanation
    The execution of a Java application starts from the main method. This is the entry point for the program where the JVM (Java Virtual Machine) starts executing the code. The main method is declared with the keyword "public" to make it accessible from outside the class, "static" so that it can be called without creating an instance of the class, "void" to indicate that it does not return any value, and "String args[]" to accept command-line arguments if any.

    Rate this question:

  • 6. 

    Select the Java numeric data types from the following:NOTE: you need to choose more than one

    • A.

      Long

    • B.

      Short

    • C.

      Byte

    • D.

      Int

    • E.

      Float

    • F.

      Double

    Correct Answer(s)
    A. Long
    B. Short
    C. Byte
    D. Int
    E. Float
    F. Double
    Explanation
    The Java programming language provides several numeric data types that can be used to store different types of numerical values. The correct answer includes long, short, byte, int, float, and double. These data types allow programmers to work with integers (long, short, byte, int) and floating-point numbers (float, double) in their Java programs.

    Rate this question:

  • 7. 

    How would you declare a constant variable called VAT whose value is 0.18?

    • A.

      Final float VAT = 0.18;

    • B.

      Final int VAT = 0.18;

    • C.

      Float final VAT = 0.18;

    • D.

      Int FINAL VAT = 0.18;

    Correct Answer
    A. Final float VAT = 0.18;
    Explanation
    The correct answer is "final float VAT = 0.18;". In Java, to declare a constant variable, we use the "final" keyword. Here, the variable name is VAT and its data type is float. The value assigned to the variable is 0.18.

    Rate this question:

  • 8. 

    A FOR loop is a predetermined loop.

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    A FOR loop is a predetermined loop because it is designed to execute a specific number of times. It uses a counter variable and a condition to determine when the loop should stop. The loop body is executed repeatedly until the condition is no longer true. This allows for precise control over the number of iterations, making it a predetermined loop.

    Rate this question:

  • 9. 

    A do...while loop will loop 0 or more times.

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    A do...while loop will loop at least one time. The loop condition is checked at the end of each iteration, so even if the condition is initially false, the loop will still execute once before checking the condition. Therefore, it is not possible for a do...while loop to loop 0 times.

    Rate this question:

  • 10. 

    A WHILE loop will loop one or more times.

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    A WHILE loop will only loop if the specified condition is true. If the condition is initially false, the loop will not execute at all. Therefore, it is possible for a WHILE loop to not loop at all. Hence, the statement "A WHILE loop will loop one or more times" is false.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 16, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Oct 06, 2017
    Quiz Created by
    Margaretbajada
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.