Module 1 - Introduction to Java Flashcards

1
Q

Is an object-oriented programming language developed by James Gosling and colleagues at Sun Microsystems in the early 1990s

A

Java

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Java is intended to be compiled to a _____, which is then run (generally using JIT compilation) by a Java Virtual Machine

A

Bytecode

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Who, where and when is Java developed?

A

James Gosling; Sun Microsystems; early 1990s

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Java was started as a project called _____ by James Gosling in _____.

A

Oak; June 1991

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The first public implementation in 1995

A

Java 1.0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Java 1.0 made the promise of _____, with free runtimes on popular platform.

A

Write Once, Run Anywhere

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

The major web browsers soon incorporated Java 1.0 into their standard configurations in a secure _____ configuration.

A

Applet

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

New versions for large and small platforms (J2EE and J2ME) soon were designed with the advent of _____.

A

Java 2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Sun has not announced any plans for a _____.

A

Java 3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

When was Sun reached out to the ISO/IEC JTCI and then Ecma International to formalize Java, but they quickly withdrew.

A

1997

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Java continues to be a _____ standard regulated by the _____.

A

de facto proprietary; Java Community Process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

With the revenue generated by new vision such as the _____, Sun made several Java implementations free of charge.

A

Java Enterprise Framework

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

The critical difference is that the compiler is not present in the _____, which differentiates between its Software Development Kit (SDK) and JRE (JRE).

A

JRE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

When was Sun launched a considerable amount of Java in the GNU General Public License as free and open-source software (GPL).

A

November 13, 2006

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

When was Sun completed the process by releasing a fully accessible, all free and open-source Java’s core code, except for a small portion of the code that Sun did not copyright.

A

May 8, 2007

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

The 5 Primary Objectives of the Development of Java Language

A
  1. The object-oriented approach should be employed
  2. It should allow multiple operating systems to run the same program
  3. It should have built-in computer network support
  4. It should be configured to execute code from distant sources safely
  5. By selecting which parts of the other object-oriented languages are considered acceptable. It should be simple to use
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q
  • Refers to a method of programming and language design
  • Idea is to design software so that the various types of data it manipulates are combined together with their relevant operations
A

Object Orientation (OO)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Data and code are combined into entities called _____

A

Objects

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

An _____ can be thought of as self-contained bundle of _____ (code) and _____ (data).

A

object; behavior; state

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is the principle of Object Orientation (OO)?

A

To make large software projects easier to manage, thus improving quality and reducing the number of failed projects

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Object Orientation develop more generic objects so that software can become more _____ between projects.

A

reusable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Software objects can hopefully be seen more as _____ components, helping the software industry build projects largely from existing and well-tested pieces, thus leading to a massive reduction in development times.

A

pluggable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Programs written in the Java language must run similarly on diverse hardware.

A

Platform Independence

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

The code is run on a _____, a program written in native code on the host hardware that interprets and executes generic Java _____.

A

Virtual Machine (VM); bytecode

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Java bytecode is interpreted or converted to native machine instructions by the _____.

A

JIT Compiler

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

In some languages the programmer allocates memory to create any object stored on the heap and is responsible for later manually deallocating that memory to delete any such objects.

A

Problem in Memory Management

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

The programmer determines when objects are created, and the Java runtime is responsible for managing the object’s lifecycle.

A

Java Automatic Garbage Collection (Avoidance of the Problem)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

What are the 7 Benefits of Java?

A
  1. Java is used in networking
  2. Java is dynamic
  3. Java is reliable
  4. Java is simple
  5. Java is secure
  6. Java is portable
  7. Java is free
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

The Java language has many classes to facilitate Internet communications. Java classes can be loaded in most browsers to facilitate secure transactions over the Internet.

A

Java is used in networking

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

Java makes it possible to reuse previously written programs to lessen the workload of a programmer.

A

Java is dynamic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

Java is _____ because it excludes some components that are error-prone. It also provides a way for programmers to anticipate and handle errors in their program.

A

Java is reliable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

The Java programming language was designed to make OOP easier. Once you understand how components in a program are treated as objects, you will find Java fairly simple.

A

Java is simple

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

Java ensures that a program can go only where it was designed to go. It eliminates the possibility of altering system data unintentionally.

A

Java is secure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

Java codes have the filename extension .java. When compiled, a class file with .class extension is created. This file can then run on any machine which has the Java Virtual Machine, thus, making it portable.

A

Java is portable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

Java codes have the filename extension _____. When compiled, a class file with _____ extension is created. This file can then run on any machine which has the _____, thus, making it portable.

A

.java; .class; Java Virtual Machine

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

Java ensures that a program can go only where it was designed to go. It eliminates the possibility of altering system data unintentionally.

A

Java is free

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q
  • Bundles all the tools you need to write, debug, and test your code
  • Allows developers to work in a single environment and improve their programming workflow
A

IDE or Integrated Development Environment

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

What are the 5 Essential Java IDE Tools?

A
  1. Debugging
  2. Syntax Highlighting
  3. Build Automation
  4. Code Completion
  5. Graphical User Interface (GUI)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

While debuggers vary among different IDEs, it’s important to have a tool to highlight potential errors and help you step through your code.

A

Debugging

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

Built-in highlighting is crucial for readability and efficiency. This tool can help you find errors in your code and allows you to sift through your code at a quicker speed.

A

Syntax Highlighting

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

A good IDE will allow you to write and run your Java code in the same window, increasing the productivity and efficiency of your program.

A

Build Automation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

This tool identifies and inserts code components to save you time and lower the risk of typos and bugs.

A

Code Completion

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

Enables an intuitive programming interface

A

Graphical User Interface (GUI)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
44
Q

What are the 7 Popular Java IDEs?

A
  1. Eclipse
  2. NetBeans
  3. IntelliJ IDEA
  4. BlueJ
  5. Oracle JDeveloper
  6. MyEclipse
  7. JCreator
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
45
Q

It’s free, open-source, and has an extensive plugin ecosystem that allows users to customize functionalities for application development.

A

Eclipse

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
46
Q

Is the official IDE for Java 8, making it a top Java IDE for creating
desktop, mobile, and web applications applications. It is open-source and is used to develop desktop, web, and mobile applications along with HTML5 and C++.

A

NetBeans

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
47
Q

It’s a capable and ergonomic IDE, with features to boost productivity without cluttering the user interface. It includes a set of tools that make programming easier, like smart completion, cross-language refactoring, data flow analysis, and language injection.

A

IntelliJ IDEA

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
48
Q

Two Editions of IntelliJ

A
  1. Community Edition

2. Ultimate Edition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
49
Q

IntelliJ edition that is free and open-source, with a focus on Android and Java Virtual Machine (JVM) development.

A

Community Edition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
50
Q

IntelliJ edition that is paid, with a focus on web and enterprise development.

A

Ultimate Edition

51
Q

Was originally created for educational content but is now used on a smaller scale for software development. While it is a great Java IDE for beginners, many Java veterans opt to use it because of its interactive and clutter-free user interface.

A

BlueJ

52
Q

Is a freeware IDE offered by Oracle. It includes features for application development in Java, PHP, SQL, XML, HTML, and JavaScript. It covers the entire development lifecycle: coding, designing, debugging, optimizing, profiling, and deploying.

A

Oracle JDeveloper

53
Q

Is a proprietary Java IDE that is built upon the Eclipse platform. It uses both proprietary and open-source code in the development environment, and its tools can be used for Java application development and web development. It offers support for Angular, HTML, TypeScript, and JavaScript.

A

MyEclipse

54
Q

Is a powerful and lightweight Java IDE written in C++, which makes it faster than other Java IDEs. It has an interface similar to that of Microsoft’s Visual Studio making source code navigation easier. It can handle various JDK profiles for multiple projects and offers strong API guidelines for developers. It’s a great option for beginners because of its intuitive user interface.

A

JCreator

55
Q

Use case: You’re a multi-language developer looking for an IDE that offers an extensive plugin environment and don’t mind taking the time to customize your experience.

A

Eclipse

56
Q

Cross-platform: Windows, Mac OS, Linux, Solaris.

A

Eclipse, NetBeans

57
Q

Use case: You’re a multi-language developer looking for a ready-to-go IDE with developer collaboration tools and Maven support.

A

NetBeans

58
Q

Cross-platform: Linux, Mac OS, Windows, Solaris

A

NetBeans

59
Q

Use case: You’re a developer whose company will pay for an IDE and who’s looking for an intuitive IDE that’s easy to use out of the box. You also have a fast computer that can handle a heavier IDE.

A

IntelliJ IDEA

60
Q

Cross-platform: Linux, Mac OS, Windows

A

IntelliJ IDEA

61
Q

Use case: You’re newer to Java development and want more practice creating simple projects in an intuitive, lightweight environment

A

BlueJ

62
Q

Cross-platform: Windows, Linux, Mac OS.

A

BlueJ

63
Q

Use case: You’re an experienced Java developer looking for a wide set of tools and have a computer that can run a heavy program.

A

Oracle JDeveloper

64
Q

Cross-platform: Windows, Linux, Mac OS

A

Oracle JDeveloper

65
Q

Use case: You’re familiar with Eclipse, and your company will pay for an IDE. You also have a fast computer to handle a heavy IDE.

A

MyEclipse

66
Q

Cross-platform: Linux, Mac OS, Windows

A

MyEclipse, IntelliJ IDEA, BlueJ, Oracle JDeveloper,

67
Q

Use case: You’re a Windows user who’s looking for a fast IDE with a clean interface and you’re willing to pay for it.

A

JCreator

68
Q

Not cross-platform: Windows

A

JCreator

69
Q

Was conceived to model real world objects

A

Object-Oriented Programming (OOP)

70
Q

In OOP, a _____ defines the _____ and _____ of a set of _____. An _____ is an instance of a _____.

A

class; common variables (attributes); methods (functions); objects; object; class

71
Q

Is a blueprint or prototype from which objects are created

A

Class

72
Q

Java _____ keyword is an access modifier. The access modifier is accessible everywhere. So, we can easily access it inside and outside the class and package.

A

public

73
Q

Every line of code that runs in Java must be inside a _____

A

class

74
Q

A class should always start with an _____

A

Uppercase First Letter

75
Q

The _____ must match the _____.

A

Name of the Java File; Class Name

76
Q

Indicates the start of a block

A

Curly Brace ({)

77
Q

What is the symbol for Multiple Line Comments?

A

Starts with /* and ends with */

78
Q
  • Is something used to document a part of a code
  • It is not part of the program itself, but used for documentation purposes.
  • It is a good programming practice to add it to your code
  • Ignored and NOT executed by the program.
A

Comment

79
Q

Indicates the name of one method in Hello class which is the main method

A

public static void main(String[] args) {

80
Q

Is the starting point of a Java program

A

Main Method

81
Q

All programs except _____ written in Java start with the main method

A

Applets

82
Q

Is used for single line comment

A

Two Backslash Character (//)

83
Q

Is used to display messages to the command window

A

System.out.println

84
Q

The last two lines which contains the _____ is used to close the main method and class respectively.

A

Two Curly Braces
} //end of main
} // end of class

85
Q

Is used to declare a class in Java

A

class keyword

86
Q

Is an access modifier that represents visibility. It means it is visible to all.

A

public keyword

87
Q

If we declare any method as _____, it is known as the _____. The core advantage of the (2nd answer) is that there is no need to create an object to invoke the (2nd answer).

A

static keyword; static method

88
Q

Is executed by the JVM, so it doesn’t require creating an object to invoke it. So, it saves memory.

A

main() method

89
Q

Is the return type of the method. It means it doesn’t return any value.

A

void

90
Q

Represents the starting point of the program.

A

main

91
Q

Is used for command line argument.

A

String[] args or String args[]

92
Q

Is used to print statement.

A

System.out.println()

93
Q

System is a _____, out is an _____ of the PrintStream class, _____ is a method of the PrintStream class.

A

class; object; println()

94
Q

Errors are usually typing errors

A

Syntax Errors Syntax

95
Q

– Misspelled a command in Java

– Forgot to write a semi-colon at the end of a statement

A

Common Syntax Errors

96
Q

Compiler Error Message: class PrinHello is public, should be declared in a file named PrintHello.java

A

Solution: check the filename with the class name class PrinHello vs. PrintHello.java

Change the class name to match the File name.

97
Q

Compiler Error Message: reached end of file while parsing

A

Solution: check the delimiter { } pairing.

Ensure that each { is paired with }

98
Q

Compiler Error Message: cannot find symbol class string

A

Solution: Change string to String, it might be that string is in lower case.

99
Q

Compiler Error Message: package system does not exist

A

Solution: system should be in Upper case. Change to System.

100
Q

Compiler Error Message: cannot find symbol method printIn(java.lang.String)

A

Solution: Change printIn to println; its print LN NOT print IN

101
Q

Compiler Error Message: unclosed string literal

A

Solution: check if the “ has a pair.

102
Q

Compiler Error Message: ‘;’ expected

A

Solution: place a ; at the end of the statement

103
Q

Errors that will not display until you run or execute your program

A

Runtime Errors

104
Q

Your Java programs should always end with the _____

A

.java extension

105
Q

Filenames should match the name of your _____.

A

public class

106
Q

You should write _____ in your code explaining what a certain class does, or what a certain method does.

A

Comments

107
Q

– These are notes written to a code for documentation purposes.
– Those texts are not part of the program and does not affect the flow of the program.

A

Java Comments

108
Q
  • // symbol denotes a single line.

- Comments is written per line

A

Single Line Comment

109
Q

You can also create _____ by starting the line with /* and ending it with */ .

A

Multiple Line Comments

110
Q

What programming language was Java’s successor?

A

C/C++ Programming

111
Q

Who is the Author of Java language?

A

James Gosling

112
Q

What is the original name of Java language?

A

Oak

113
Q

What type of Java program can be run inside a Java supported Web browser?

A

Applet

114
Q

Which company owns Java at present?

A

Oracle

115
Q

What software runs a Java program in a computer?

A

Java Runtime Environment (JRE)

116
Q

What is the output file of a Java compiled program?

A

.class file

117
Q

When was the first version of Java (i.e. Java 1.0) release?

A

1995

118
Q

What type of programming language is Java?

A

Object-Oriented Programming

119
Q

What does JIT in Java means?

A

Just-In-Time

120
Q

What is the correct header line for Java program?

A

public static void main(String[] args) {
or
public static void main(String args[]) {

121
Q

What does a single line comment look like in Java?

A

//comment

122
Q

Program statements in Java must end with

A

semi colon (;)

123
Q

What is an example of multi-line comment?

A
/* The beginning of a multi-line
the end of the multi-line */
124
Q

What do you call the curly braces found at the starting of the program and end of the program?

A

Delimiter