Docsity

java programming for interview 2m answers, Summaries of Javascript programming

Toggle sidebar
bg1
1. Comments in Java:
- Single-line comment: // comment
- Multi-line comment: /* ... */
- Documentation comment: /** ... */
2. Java is Platform Independent:
Java uses bytecode and JVM, enabling Write Once Run Anywhere.
3. Java Virtual Machine:
JVM executes bytecode and provides runtime environment.
4. Bytecode:
Intermediate platform-independent code executed by JVM.
5. Variable Definition:
A variable is a named memory location.
Types: Local, Instance, Static.
6. Primitive Data Types:
byte(1), short(2), int(4), long(8), float(4), double(8), char(2), boolean(1 bit).
7. Difference between / and %:
Division (/) returns quotient; Modulus (%) returns remainder.
8. Logical Operators:
&&, ||, !
9. Difference between if and if-else:
if executes only when condition true; if-else provides alternative block.
10. Nested if:
pf2

Partial preview of the text

Download java programming for interview 2m answers and more Summaries Javascript programming in PDF only on Docsity!

  1. Comments in Java:
  • Single-line comment: // comment
  • Multi-line comment: /* ... */
  • Documentation comment: /** ... */
  1. Java is Platform Independent: Java uses bytecode and JVM, enabling Write Once Run Anywhere.
  2. Java Virtual Machine: JVM executes bytecode and provides runtime environment.
  3. Bytecode: Intermediate platform-independent code executed by JVM.
  4. Variable Definition: A variable is a named memory location. Types: Local, Instance, Static.
  5. Primitive Data Types: byte(1), short(2), int(4), long(8), float(4), double(8), char(2), boolean(1 bit).
  6. Difference between / and %: Division (/) returns quotient; Modulus (%) returns remainder.
  7. Logical Operators: &&, ||,!
  8. Difference between if and if-else: if executes only when condition true; if-else provides alternative block.
  9. Nested if:

An if statement inside another if.