FIRST TEST Flashcards

1
Q

what is JAVA?

A

Object oriented programming

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

Static keyword

A

The static keyword denotes that a member variable, or method, can be accessed without requiring an instantiation of the class to which it belongs.

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

Main method

A

Is the method where all of the other methods are stored

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

Whats the syntax to import java classes

A

import packageName
or
import packageName.ClassName

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

PG 53

A

IMPORTANT LOOK AT IT

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

How do you create a Scanner object

A

Scanner sc = new Scanner(System.in)

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

next()

A

returns the next token stored in the scanner as a string object

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

nexInt()

A

returns the next token stored in the scanner as an int value

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

nextDouble()

A

returns the next token stored in the scanner as a double value

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

nextLine()

A

returns any remaining input on the current line as a string object and advances the scanner to the next line

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

eight primitive data types

A
byte 1
short 2
int 4
long 8
float 4
double 8
char 2
boolean 1
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

casting

A

converting one data type to another

byte –>short –>int –>long–>float–>double

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

implicit casting

A

byte –>double

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

explicit casting

A

double –>byte

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

Integer and double classes

A

also referred to as wrapper classes

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

what is a Boolean expression

A

A boolean expression is anything that you can evaluate and get a result that is boolean, i.e., either true or false. Here are some examples:

17
Q

&& vs &

A

&& evaluates second statement if necessary
& always evaluates both expressions

same for OR operators

18
Q

how to code for loops

A

for ( initializationExpression; booleanExpression; incrementExpression)
{
statements
}

19
Q

break statements

A

Kicks you out of the loop

break;

20
Q

what is an exception

A

an exception is an object that contains information about an error that has occurred.

21
Q

the goal of testing & debugging

A

testing = find errors

debugging = to fix all errors

22
Q

syntax error

A

violate the rules of how java statements must be written

23
Q

run time error

A

don’t violate syntax rules, but they throw exceptions that stop the execution of the application

24
Q

logic error

A

Logical errors in your code

Example: you should of used + instead of a -

25
Q

presentation layer

A

handles the details of the applications user interface

26
Q

middle layer

A

provides an interface between the database layer and presentation layer

27
Q

database layer

A

responsible for all of the database access that required by the application Typically include methods that connect to the database and retrieve, add, update, and delete information from the database