Chapter1 Flashcards

1
Q

How does java work?

A
  1. You write a source code.
  2. Compiler (checks for errors and will only run if everything is correct)
  3. Output code (compiler makes the bytecode which is .class)
  4. Virtual Machine takes the .class and translates it into what the platform understands and runs the program.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the source file?

A

it is the .java file. you put a class

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

WAP to check if the number is prime or not

A

for (int i =2; 2/num; ++i){
if(num%2==0){primeflag==true}
else{

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