Computer Programming II: Java Chapter 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 Justinsmith
J
Justinsmith
Community Contributor
Quizzes Created: 9 | Total Attempts: 38,251
Questions: 20 | Attempts: 730

SettingsSettingsSettings
Computer Programming II: Java Chapter 1 - Quiz

Java is a programming language that is designed for use in the distributed environment of the internet, and it is one of the general-purpose languages in use today. Below is a review quiz over the material covered in chapter one of computer programming II at Metcalfe county high school. Do you think you can handle it? Give it a shot and get to find out!


Questions and Answers
  • 1. 

    Which of the following is not a true reason Java is so popular?

    • A.

      Enables users to develop and deploy applications on the Internet

    • B.

      It as a free program

    • C.

      Java has paid lots of money for promotion of the language

    • D.

      Java is used around the world for Internet programming purposes

    Correct Answer
    C. Java has paid lots of money for promotion of the language
    Explanation
    Java's popularity is not due to the fact that it has paid lots of money for promotion of the language. While marketing and promotion may have played a role in increasing awareness and adoption of Java, its popularity primarily stems from its ability to enable users to develop and deploy applications on the Internet, its availability as a free program, and its widespread use for Internet programming purposes around the world.

    Rate this question:

  • 2. 

    What year was Java created?

    • A.

      1996

    • B.

      1994

    • C.

      1995

    • D.

      1999

    Correct Answer
    C. 1995
    Explanation
    Java was created in 1995. It was developed by James Gosling and his team at Sun Microsystems. Java is a general-purpose programming language that was designed to be platform-independent, meaning it can run on any device or operating system that has a Java Virtual Machine (JVM). It quickly gained popularity due to its simplicity, object-oriented nature, and ability to run on multiple platforms.

    Rate this question:

  • 3. 

    What company helped create Java?

    • A.

      Sun Microsystems

    • B.

      Microsoft

    • C.

      Norton's

    • D.

      Dell

    Correct Answer
    A. Sun Microsystems
    Explanation
    Sun Microsystems is the correct answer because they were the primary company responsible for creating the Java programming language. Java was developed by a team of engineers led by James Gosling at Sun Microsystems in the mid-1990s. Sun Microsystems played a crucial role in the design, development, and promotion of Java, which went on to become one of the most widely used programming languages in the world.

    Rate this question:

  • 4. 

    Java was created before Visual Basic?

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    Java was not created before Visual Basic. Visual Basic was developed by Microsoft in the mid-1990s, while Java was created by James Gosling and his team at Sun Microsystems in the mid-1990s as well. Therefore, the correct answer is False.

    Rate this question:

  • 5. 

    Which of the following is not a general step in problem solving?

    • A.

      Understand the problem

    • B.

      Dissect the problem into manageable pieces

    • C.

      Design a solution

    • D.

      Consider alternatives to the solution and refine it

    • E.

      Implement the solution

    • F.

      Test the solution and fix any problems that exist

    • G.

      Remove any unused material

    Correct Answer
    G. Remove any unused material
  • 6. 

    What is the name of the program we use to develop out Java programs?

    • A.

      Java Creator

    • B.

      JCreator

    • C.

      Creator Java

    • D.

      Visual Java 6.0

    Correct Answer
    B. JCreator
    Explanation
    JCreator is the correct answer because it is a program used to develop Java programs. It is a powerful and efficient integrated development environment (IDE) specifically designed for Java programming. It provides various features such as code editing, debugging, and compiling tools that help developers write and test their Java code easily and efficiently.

    Rate this question:

  • 7. 

     Many projects fail because the developer or repair person didn't understand the problem to be solved. •

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    Many projects fail because the developer or repair person didn't understand the problem to be solved. This is true because without a clear understanding of the problem, it becomes difficult to come up with an effective solution. If the developer or repair person doesn't fully comprehend the problem, they may end up implementing the wrong solution or not addressing the root cause of the issue. This lack of understanding can lead to wasted time, resources, and ultimately project failure.

    Rate this question:

  • 8. 

    Java is case senstive

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    Java is a case-sensitive programming language, meaning that it distinguishes between uppercase and lowercase letters. This means that variables, methods, and other identifiers must be written with consistent capitalization in order to be recognized by the compiler. For example, "myVariable" and "myvariable" would be considered as two different variables in Java. Therefore, the correct answer is True.

    Rate this question:

  • 9. 

    Which of the following are not one of the five main parts of a Java program?

    • A.

      Main Method

    • B.

      Class Header

    • C.

      Class Body

    • D.

      Method Body

    • E.

      Main Body

    • F.

      Method Header

    Correct Answer
    E. Main Body
    Explanation
    The correct answer is "Main Body". In a Java program, the main method is the entry point of the program, the class header defines the class name and any inheritance or interfaces, the class body contains the variables and methods of the class, the method body contains the code that is executed when the method is called, and the method header defines the method name, return type, and parameters. However, "Main Body" is not a recognized part of a Java program.

    Rate this question:

  • 10. 

    Comments should be included to explain the purpose of the program and explain processing steps.

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    The given correct answer is "True". However, without any context or question provided, it is impossible to determine the specific explanation for why "True" is the correct answer. It could be related to a specific statement, fact, or condition. Without additional information, a proper explanation cannot be provided.

    Rate this question:

  • 11. 

    Reserved words can have their meaning changed in Java.

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    Reserved words in Java cannot have their meaning changed. Reserved words are predefined keywords that have specific meanings and functionalities in the Java programming language. These words are reserved and cannot be used as identifiers or variable names. The meanings of reserved words are fixed and cannot be altered or modified by the programmer. Therefore, the statement that reserved words can have their meaning changed in Java is false.

    Rate this question:

  • 12. 

    Which of the following is a reserved word in Java?

    • A.

      If

    • B.

      Would

    • C.

      Because

    • D.

      Loop

    Correct Answer
    A. If
    Explanation
    In Java, "if" is a reserved word. Reserved words are predefined keywords that have special meanings in the programming language and cannot be used as identifiers or variable names. The "if" keyword is used for conditional statements, allowing the program to execute certain code blocks only if a specific condition is met.

    Rate this question:

  • 13. 

    Why is white space needed within a computer program?

    • A.

      JCreator and other Java programs require white space

    • B.

      To help seperate words and symbols

    • C.

      To add meaning to the program

    • D.

      To help people understand what the programming is doing at a certain point

    Correct Answer
    B. To help seperate words and symbols
    Explanation
    White space is needed within a computer program to help separate words and symbols. This is important because it allows the program to be more readable and understandable to both the programmer and other people who may need to read or modify the code. By using white space to create visual separation between different elements of the program, such as variables, operators, and keywords, it becomes easier to identify and comprehend the logic and structure of the code. Overall, white space adds clarity and meaning to the program, making it more manageable and maintainable.

    Rate this question:

  • 14. 

    A banner has been posted inside of the computer lab at Rogers Technical Institute.  The banner reads “A solution in programming is not always a permanent fix to the problem.”  Which of the following is not a correct analysis of the banner and its overall meaning to computer programmers?

    • A.

      The solution may not be the best (most efficient)

    • B.

      The solution may have errors and need testing and fixing before we are done

    • C.

      The solution may, at a later date, need revising because of new programming language features

    • D.

      The solution needs to be reviewed by programming teams and deconstructed

    Correct Answer
    D. The solution needs to be reviewed by programming teams and deconstructed
    Explanation
    The given answer, "the solution needs to be reviewed by programming teams and deconstructed," is incorrect because it contradicts the statement on the banner. The banner states that a solution in programming is not always a permanent fix to the problem, implying that it may not need to be reviewed or deconstructed by programming teams. The other options correctly analyze the meaning of the banner by highlighting that a solution may not be the best or most efficient, may have errors and need testing and fixing, or may need revising in the future due to new programming language features.

    Rate this question:

  • 15. 

    Greg has been asked to work with other programmers at Java Tech to solve programming errors.  Greg wants to dissect a problem into manageable pieces before trying to solve the problem.  This is a suggested practice within the problem solving process because

    • A.

      Most problems are too complex to be solved as a single, large activity

    • B.

      Most problems are solved by multiple people and it is easy to assign each piece to a separate person

    • C.

      It is easier to integrate small pieces of a program into one program than it is to integrate one big chunk of code into one program

    • D.

      The first solution may not solve the problem correctly

    Correct Answer
    A. Most problems are too complex to be solved as a single, large activity
    Explanation
    Dissecting a problem into manageable pieces before attempting to solve it is a suggested practice within the problem-solving process because most problems are too complex to be solved as a single, large activity. Breaking down the problem into smaller, more manageable pieces allows for a more systematic and organized approach to finding a solution. By dividing the problem into smaller parts, it becomes easier to analyze and understand each component, making it more feasible to identify and address any errors or issues. This approach also allows for better collaboration and distribution of work among multiple programmers if needed.

    Rate this question:

  • 16. 

    Sally has been asked by her high school programming teacher to write the main method for a Java program on the SmartBoard. Which of the following structures defines the main method for a Java program?

    • A.

      Public static void main( )

    • B.

      Public static void main(String[ ] args);

    • C.

      Public static void main(String[ ] args)

    • D.

      Private static void main(String[ ] args)

    Correct Answer
    C. Public static void main(String[ ] args)
    Explanation
    The main method in Java is the entry point for a Java program. It is where the program starts executing. The correct answer is "public static void main(String[ ] args)" because this is the standard signature for the main method in Java. It is a public method, so it can be accessed from anywhere in the program. It is also a static method, meaning it belongs to the class rather than an instance of the class. It has a void return type, indicating that it does not return any value. Finally, it takes a String array as a parameter, which can be used to pass command line arguments to the program.

    Rate this question:

  • 17. 

    • A.

      The above image shows the program lifecycle

    • B.

      The above image shows the error checking needed within a program

    • C.

      The above image shows the flowcharting of Java

    • D.

      The above image shows the basic program development cycle

    Correct Answer
    D. The above image shows the basic program development cycle
  • 18. 

    A black and white picture can be stored using what two numbers?

    • A.

      0,255

    • B.

      0,1

    • C.

      10,11

    • D.

      0,99

    Correct Answer
    B. 0,1
    Explanation
    A black and white picture can be stored using the numbers 0 and 1. In computer graphics, black is typically represented by the number 0, indicating the absence of color, while white is represented by the number 1, indicating the presence of color. This binary representation allows for efficient storage and processing of black and white images, as each pixel can be represented by a single bit of information.

    Rate this question:

  • 19. 

    Which of the following is not a primary color used in Java?

    • A.

      Yellow

    • B.

      Red

    • C.

      Green

    • D.

      Blue

    Correct Answer
    A. Yellow
    Explanation
    In Java, the primary colors used are Red, Green, and Blue, which are combined to create a wide range of colors. Yellow is not considered a primary color in Java.

    Rate this question:

  • 20. 

    Java programs can also be typed in which of the following software programs?

    • A.

      Notepad

    • B.

      Explorer

    • C.

      Excel

    • D.

      Visual Basic

    Correct Answer
    A. Notepad
    Explanation
    Java programs can also be typed in Notepad because Notepad is a simple text editor that allows users to create and edit plain text files. Java programs are written in plain text format with a .java extension. Although specialized Integrated Development Environments (IDEs) like Eclipse or IntelliJ are commonly used for Java programming, Notepad can still be used as a basic editor for writing Java code. It does not provide any additional features or tools specific to Java development, but it can be used for simple programs or when a more advanced IDE is not available.

    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 21, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Nov 14, 2010
    Quiz Created by
    Justinsmith
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.