Java Flashcards
Servlets
Servlets
JSP
JSP
JRE
JRE
JDK
JDK
public static void
public means the method can be called fromanywhere
static means you don’t have to create an instance of the class
void means that you are not returning anything from the class
Memory (Heap vs Stack)
2 Types of Variables in Java
Primitives: Stored in the fastest possible memory, but can only inlcude numeric values such as: integers and floating decimals. Single characters not completed strings, and Boolean values. Thy can be accessed very quickly.
**Complex Objects: **Everything else in your Java application is going to be represented as a complex object.
Primitive numeric data types
double
float
long
int
short
byte
Encapsulation
Encapsulation
Inheritance
Inheritance
Polymorphism
Polymorphism
Interpreted Language
Java is an interpreted language meaning that the application is compiled to a format that’s interpreted at runtime rather than being run as machine code directly. That is what makes the applications in java portable.
Runtime Architecture
Function / Method
Is a set of code that’s wrapped up and then given a name, so that it can be called easily from other parts of the application. In Java however, we use the term method because it’s a function that’s a member of a class.
Acccess Modifier
Public means the method is available to the entire application or at least to any part of the application that can see the class itself. So if the class is public and themethod is public, then it can be called from anywhere.
Private is the opposite. The method is only available to code within this class.
Protected has to do with inheritance. A protected method is available to the current class and to any of its sub classes.