INTRODUCTION TO JAVA Flashcards

1
Q

Who created Java and when?

A

Creator: James Gosling
From: Sun Microsystems Inc
Year: 1995
Later Acquired BY: Oracle Corporation

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

a class-based, object-oriented programming language and is designed to have as few implementation dependencies as possible.

A

JAVA

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

Syntax of Java is similar to:

A

C/ C++

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

What is the meaning of the slogan WORA

A

Write Once Run Anywhere

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

Why is Java called Java?

A

Named after the island where the first coffee was produced, Java Coffee

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

ensures the same Java code can be run on different operating systems and platforms.

A

Java Virtual Machine

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

Reasons to use Java

A
  1. Easy to Learn
  2. Simple to use
  3. Open source / FREE
  4. Popular
  5. Similar syntax with C and C++
  6. Allows code to be reused, LOWERS Development COSTS
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

is required and you will see it in every Java
program:

A

Main Method

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

method to print a line of text to the screen.

A

Print Method
println();

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

All Java variables must
be identified with unique names
called:

A

Identifiers

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

Give me examples of primitive data type

A

byte
short
int
long
float
double
boolean
char

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

Give me examples of non primitive data type

A

String
Arrays
Classes
Interface
and more…

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

data types are called reference types because they refer to objects

A

Non primitive

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

These are used to perform common mathematical operations

A

Arithmetic Operators

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

These are used to assign values to variables

A

Assignment Operators

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

These are used to compare two values (or variables). The return value is true or false.

A

Comparison Operators

17
Q

These are used to determine the logic between variables or values.

A

Logical Operators

18
Q

These are used to perform operations on individual bits of the operands. They are useful for low-level
programming, such as manipulating bits in memory, encryption, compression, etc.

A

Bitwise Operators

19
Q

This class is part of the java.util package in
Java and is used for reading input from different sources, such
as the keyboard.

A

java.util.Scanner;

20
Q

Cannot be used for a variable name in java

A

Keywords (Reserved Words)

20
Q

is an object associated with the standard
input device.

A

System.in object

21
Q

Scanner method used to read a string value form the user is:

22
Q

There is also a short-hand if else, which is known as the _______ because it consists of three operands.

A

ternary
operator

23
Q

loop inside another loop.

A

nested loop

24
is used exclusively to loop through elements in an array.
for each loop
25
The simplest kind of loop in Java
while loop
26
can also be used to jump out of a loop.
Break Statement
27
breaks one iteration (in the loop), if a specified condition occurs, and continues with the next iteration in the loop (parang “skip”).
The continue statement
28
are functions defined within classes
Methods
29
You can pass data, known as________, into a method.
parameters
30
are variables declared within a class.
Global Variables
31
These are variables declared inside a method, condition, loops and any other block of code.
Local Variables
32
You can use the same method name but different parameters so that you will cater every possibility of a method
Overloading methods
33
the technique of making a function call itself.
Recursion
34
To aid in the organization of large code repository, Java allows a group of related type definitions (such as classes) to be grouped into what is known as a
Packages
35
IMPORTING PACKAGES What does importing specific packages look like
import packagename.classname
36
The process of creating an instance of a class so we can use it on our program.
Class instantiation