Mastering Java Fundamentals Study Guide

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

1/18

flashcard set

Earn XP

Description and Tags

A complete set of flashcards covering key concepts, syntax, data types, memory mechanics, and control flow from the Mastering Java Fundamentals guide.

Last updated 5:51 PM on 8/25/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

19 Terms

1
New cards

Who created Java, in what year, and at what company was it created?

Java was created by James Gosling in 1995 at Sun Microsystems, which was later acquired by Oracle in 2010.

2
New cards

What were the original names of Java before it was officially named Java?

Java was originally named 'Oak' (after an oak tree outside James Gosling's office) and was later renamed to 'Green' before becoming 'Java'.

3
New cards

What are the four editions of the Java platform?

  1. Java Standard Edition (Java SE)
  2. Java Enterprise Edition (Java EE)
  3. Java Micro Edition (Java ME)
  4. Java Card
4
New cards

What are the two main phases of executing a Java program?

  1. Compilation: The compiler (javac) translates source code (.java) into platform-independent Java Bytecode (.class).
  2. Execution: The Java Virtual Machine (JVM) inside the JRE loads the bytecode and translates it into native machine instructions.
5
New cards

What is the exact signature of the entry point main method in Java?

public static void main(String[] args)

6
New cards

What naming conventions are used for Java classes versus Java methods and variables?

Classes use the Pascal Naming Convention (e.g., Main, MyFirstClass). Methods and variables use the Camel Naming Convention (e.g., main, sendEmail, myAge).

7
New cards

What are the 8 primitive data types in Java and their memory sizes?

byte (1 byte), short (2 bytes), int (4 bytes), long (8 bytes), float (4 bytes), double (8 bytes), char (2 bytes), and boolean (1 byte).

8
New cards

How does memory allocation differ when copying Primitive Types versus Reference Types?

Primitives are copied by value, storing independent values in separate memory slots. Reference types are copied by reference, copying the memory address pointer so both variables point to the exact same object in memory.

9
New cards

Why are String objects described as immutable in Java?

Any String method that modifies text (such as trimming or replacing characters) always returns a brand-new String object rather than altering the original string.

10
New cards

What are the rules and default values for Java arrays?

Java arrays are reference types with a fixed length that cannot be changed once created. Uninitialized array slots default to 0 for numbers, false for booleans, or empty strings.

11
New cards

Which methods are used to convert single-dimensional and multi-dimensional arrays into readable String representations?

Arrays.toString() is used for single-dimensional arrays, and Arrays.deepToString() is used for multi-dimensional arrays.

12
New cards

How do you define a constant in Java, and what is its naming convention?

Prepend the keyword final to the variable declaration. By convention, constant names are written in all-uppercase letters.

13
New cards

What is the difference between prefix (++x) and postfix (x++) increment operators?

Postfix (x++) copies the original value to the left side expression first and then increments the variable. Prefix (++x) increments the variable first before assigning or evaluating the value.

14
New cards

How do implicit casting and explicit casting differ in Java?

Implicit casting happens automatically when converting a smaller type to a larger compatible type without data loss. Explicit casting is manually required when converting a larger type to a smaller type by prefixing the target type in parentheses, which risks data loss.

15
New cards

Why can you not use the 'new' operator to instantiate the NumberFormat class?

NumberFormat is an abstract class, so you must call factory methods such as NumberFormat.getCurrencyInstance() or NumberFormat.getPercentInstance() instead of using new.

16
New cards

What data types are supported in Java switch statements?

Switch statements support bytes, shorts, ints, and strings.

17
New cards

What is the main operational difference between a while loop and a do-while loop?

A while loop evaluates its condition before running the code block, whereas a do-while loop evaluates its condition at the end, guaranteeing the block executes at least once.

18
New cards

What are two major limitations of a Java for-each loop?

It is forward-only and does not provide access to the loop index.

19
New cards

What is the difference between scanner.next() and scanner.nextLine()?

scanner.next() reads only a single token and stops at whitespace, whereas scanner.nextLine() reads the entire line of input including spaces.