# Are You Smarter Than A Programmer?

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 Rzimmerle
R
Rzimmerle
Community Contributor
Quizzes Created: 2 | Total Attempts: 1,097
Questions: 6 | Attempts: 713

Settings

• 1.

### Which contains a decimal?

• A.

Double

• B.

Int

• C.

Character

• D.

Boolean

A. Double
Explanation
A decimal is a number that includes a fractional part, and the data type "double" in programming languages like Java and C++ is used to represent decimal numbers. The "int" data type is used to represent whole numbers without any fractional part. The "character" data type is used to represent individual characters, such as letters or symbols. The "boolean" data type is used to represent true or false values. Therefore, the correct answer is "double" as it is the only data type mentioned that can contain a decimal.

Rate this question:

• 2.

### What are the two parts of every object?

• A.

Methods and words

• B.

Numbers and variables

• C.

Methods and properties

• D.

Words and numbers

C. Methods and properties
Explanation
Every object in programming consists of two essential parts: methods and properties. Methods are the actions or behaviors that an object can perform, while properties are the characteristics or attributes that describe the object. Methods allow objects to perform specific tasks or operations, while properties hold the data or information associated with the object. Therefore, methods and properties are the two fundamental components that make up every object in programming.

Rate this question:

• 3.

### Who discovered the first computer bug?

• A.

• B.

Grace Hopper

• C.

Donald Knuth

• D.

Richard Stalman

B. Grace Hopper
Explanation
Grace Hopper is credited with discovering the first computer bug. In 1947, while working on the Harvard Mark II computer, Hopper found a moth trapped between the relay contacts, causing a malfunction. She taped the moth to the logbook and wrote "First actual case of bug being found." This incident popularized the term "bug" to refer to computer glitches. Hopper's contributions to computer programming and her work on the development of COBOL have had a significant impact on the field of computing.

Rate this question:

• 4.

### What package would you use to create a Graphical User Interface?

• A.

Java.awt

• B.

Java.util

• C.

Javax.swing

• D.

Java.io

C. Javax.swing
Explanation
The javax.swing package is used to create a Graphical User Interface (GUI) in Java. It provides a set of components and classes that allow developers to create interactive and visually appealing GUI applications. The package includes classes for creating windows, buttons, menus, and other GUI elements. It also provides support for layout management, event handling, and data binding. Overall, javax.swing is the preferred package for creating GUI applications in Java.

Rate this question:

• 5.

### Which is a correct method heading?

• A.

Protected method()

• B.

Int method()

• C.

Private()

• D.

Public void method()

D. Public void method()
Explanation
The correct method heading is "public void method()". In Java, the "public" keyword indicates that the method can be accessed from anywhere, "void" specifies that the method does not return any value, and "method()" is the name of the method.

Rate this question:

• 6.

### What theoretical device is typically used to demonstrate how a computer handles tasks?

• A.

Microwave oven

• B.

Turing Machine

• C.

Warp Drive

• D.

EDM

B. Turing Machine
Explanation
A Turing Machine is a theoretical device that is typically used to demonstrate how a computer handles tasks. It is a mathematical model that consists of a tape, a read-write head, and a set of rules. The tape is divided into cells, each containing a symbol, and the read-write head can read and write symbols on the tape. The set of rules determine the machine's behavior, allowing it to perform various tasks by manipulating symbols on the tape. The Turing Machine is a fundamental concept in computer science and helps in understanding the capabilities and limitations of computers.

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
• Jan 21, 2013
Quiz Created by
Rzimmerle

Related Topics