java Flashcards
java environment
is the entire ecosystem where java applications are developed ,managed and executed
components and concepts of java environment
java development kit
java runtime environment
java virtual machine
java compiler
cross path
java standard libraries
integrated development environment
java development kit
it is a package that has everything needed to develop, manage and run java applications
java runtime environment
it has the needed libraries for executing java applications
java virtual machine
it interprets and executes java bytecodes
Java Compiler
it compiles java source code to bytecode
Java Standard Library
it provide ready-made functionality for tasks
Class path
it tells the JVM where to find classes and libraries required by a Java application.
Integrated Development Environments
provide a convenient development environment for Java programmer
Case Sensitivity
meaning that it distinguishes between uppercase and lowercase letters
Operators
various operators, including arithmetic (+, -, *, /), comparison (==, ===, !=, !==, >, <), logical (&&, ||, !), and assignment (=).
class names
Java class names must start with an uppercase letter and follow the CamelCase convention (e.g., MyClass
).
. Method Names
Method names in Java start with a lowercase letter and also follow CamelCase (e.g., myMethod
).
.Variables
Java requires explicit data type declarations for variables, e.g., int myVariable = 10;
specifies that myVariable
is an integer
public static void main
Java programs start executing from a public static void main(String[] args)
method within a class. This method serves as the entry point for the program
Program File Name
the file name must match the public class name defined in that file, including capitalization (e.g., MyClass.java
for class MyClass
).
. Identifiers
must start with a letter, underscore (_), or dollar sign ($) and can be followed by letters, digits, underscores, and dollar signs.
.Arrays
Java arrays are strongly typed, meaning they can hold only elements of a specific data type. For example, you declare an integer array as int[] myArray
.
Enums
Java supports enumerated types (enums), which define a fixed set of constants or values
Java data types
integer-whole numbers
float-decimals
string-text
boolean-true or false
Java statements
statements are individual instructions that make up a Java program
Declaration Statements
Declaration statements are used to declare variables. They specify the name and data type of a variable.
int age; // Declaration statement for an integer variable named “age”
Assignment Statements
Assignment statements are used to assign values to variables.
age = 25; // Assignment statement: assigning the value 25 to the “age” variable
```
Expression Statements
- Expression statements consist of expressions that are evaluated and may produce a result. They are often used for their side effects.int result = 5 + 7; // Expression statement: calculating the sum of 5 and 7 and assigning it to “result