Introduction to Programming in Java with BlueJ: 30 flashcards

All 30 flashcards from this kit, free and with no sign-up.

1. Who developed Java and in what year?

Show the answer

James Gosling at Sun Microsystems in 1995.

2. What does WORA stand for in Java?

Show the answer

Write Once, Run Anywhere.

3. What is byte code?

Show the answer

An intermediate form of Java code produced by the compiler, which runs on any system with a JVM.

4. What is the JVM?

Show the answer

Java Virtual Machine — the interpreter that reads byte code and translates it for the underlying system.

5. What is BlueJ?

Show the answer

An IDE for Java, mainly used for educational purposes, that runs with a JDK.

6. List the five steps of programming.

Show the answer

Identifying the problem, designing, coding, testing, and debugging.

7. Who coined the term 'bug' and how?

Show the answer

Grace Hopper, after finding a moth in a computer relay.

8. What are identifiers in Java?

Show the answer

Names given to classes, methods, variables, and interfaces; they are case-sensitive.

9. What characters can a Java identifier start with?

Show the answer

A letter, dollar sign ($), or underscore (_).

10. What are literals?

Show the answer

Fixed values written directly in code: integer, real, string, character, boolean.

11. How are octal and hexadecimal integer literals written in Java?

Show the answer

Octal with prefix 0; hexadecimal with prefix 0x.

12. List the eight primitive data types and their sizes.

Show the answer

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

13. What are derived data types?

Show the answer

Types like arrays that hold multiple values of the same type.

14. What are the three types of variables in Java?

Show the answer

Instance variables, static variables, and local variables.

15. Where are instance variables declared?

Show the answer

Inside a class but outside any method.

16. What keyword declares a static variable?

Show the answer

The static keyword.

17. Where are local variables declared?

Show the answer

Inside a method, and they are only accessible there.

18. What do relational operators return?

Show the answer

A boolean value (true or false).

19. What is the difference between && and ||?

Show the answer

&& (AND) is true only if both operands are true; || (OR) is true if at least one is true.

20. What does the modulus operator (%) do?

Show the answer

It gives the remainder of a division.

21. What is an if-else-if ladder?

Show the answer

A selection structure that checks conditions from top to bottom; the first true condition executes.

22. What is the difference between compiling and executing?

Show the answer

Compiling converts source code to byte code; executing runs the byte code.

23. What are the steps to run a program in BlueJ?

Show the answer

Create project, create class, write code, compile, execute via void main().

24. What is an algorithm?

Show the answer

A step-by-step solution to a problem, essential before coding.

25. What is the difference between testing and debugging?

Show the answer

Testing checks for correct results; debugging finds and corrects errors.

26. What is the Java mascot called and who created it?

Show the answer

Duke, created by Joe Palrang.

27. How many characters does ASCII define? And UNICODE?

Show the answer

ASCII defines 128 (extended 256) characters; UNICODE defines over 2 million characters.

28. What are assignment operators? Give examples.

Show the answer

Operators like =, +=, -=, *=, /=, %= that assign values to variables.

29. What is the difference between syntax errors and logic errors?

Show the answer

Syntax errors are caught at compile time; logic errors are caught during testing.

30. Why is Java platform-independent?

Show the answer

Because it compiles to byte code, which runs on any system with a JVM.

Make your own

Your notes can be a kit like these

Every kit here was made from real study material. Point Veda at a chapter, a PDF, a photo or a link and get notes, flashcards, practice MCQs, games and a scored test — free to start, in more than 40 languages.

  • Chapter notes
  • Flashcards
  • Practice MCQs
  • Scored tests
  • Paper Solver

Get Veda free See what students get

Free to start · Android app and web · More than 40 languages