Intro to Objects - Computer Math

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/16

encourage image

There are no tags or description

Looks like no tags are added yet.

17 Terms

1
New cards

What method is required for a Java application to be runnable?

public static void main(String[] args)

2
New cards

What file extension is used for Java source code?

.java

3
New cards

What file extension is used for Java bytecode?

.class

4
New cards

What is the purpose of the javac compiler?

It translates Java source code into bytecode, making it platform-independent.

5
New cards

What keyword is used to ignore comments in Java?

// (double forward slash) for single-line comments.

6
New cards

What keyword is used to make external classes and packages accessible in Java?

import

7
New cards

What keyword is used to create a new object in Java?

new

8
New cards

What is a superclass in Java?

A base class that defines what objects can do.

9
New cards

What does the extends keyword indicate in Java?

It indicates that a class is a subclass of another class, allowing inheritance.

10
New cards

What is the default starting position of a Robot created with the default constructor?

(1, 1) facing Display.EAST with 0 beepers.

11
New cards

What is the default starting position of an Athlete created with the default constructor?

(1, 1) facing Display.NORTH with Display.INFINITY beepers.

12
New cards

How do you instantiate a Robot with custom starting data?

Using syntax like Robot john = new Robot(4, 1, Display.NORTH, 5);.

13
New cards

What must a Java class name do in relation to its filename?

It must perfectly match the filename.

14
New cards

How are blocks of code grouped in Java?

Using matching curly braces.

15
New cards

What do methods in Java always include?

Parentheses, as seen in commands like move(); or putBeeper();.

16
New cards

Are identifiers in Java case-sensitive?

Yes, identifiers are case-sensitive.

17
New cards

What restrictions apply to naming identifiers in Java?

Identifiers cannot be keywords and must only contain letters, numbers, and underscores.