0% found this document useful (0 votes)
2 views86 pages

Java Cheat Sheet PDF for Quick Reference

The document is a comprehensive Java cheat sheet that covers key concepts such as object-oriented programming, data types, typecasting, operators, and methods. It also explains Java's memory management, exception handling, and various programming constructs like loops and conditional statements. Additionally, it outlines the principles of object-oriented programming, including encapsulation, inheritance, and polymorphism, along with practical examples and code snippets.

Uploaded by

divas280501
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views86 pages

Java Cheat Sheet PDF for Quick Reference

The document is a comprehensive Java cheat sheet that covers key concepts such as object-oriented programming, data types, typecasting, operators, and methods. It also explains Java's memory management, exception handling, and various programming constructs like loops and conditional statements. Additionally, it outlines the principles of object-oriented programming, including encapsulation, inheritance, and polymorphism, along with practical examples and code snippets.

Uploaded by

divas280501
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

Catalog Resources

Pricing Dashboard Log in Get Started

Premium For Students

Home / Articles / Programming Subscribe to our


Newsletter for
Simran Kaur Arora Share Articles, News, &
09 Aug, 2019 Jobs.

Email address
Java Cheat Sheet: I accept the

Download PDF for Quick Terms and


Conditions.

Reference Subscribe

Disclosure: [Link]
is supported by its
audience. When
you purchase
Object-Oriented Programming Language: based through links on our
site, we may earn
on the concepts of “objects”. an affiliate
Open Source: Readily available for development. commission.

Platform-neutral: Java code is independent of any In this article

particular hardware or software. This is because Summary

Java code is compiled by the compiler and


converted into byte code. Thus, byte code is
platform-independent and can run on multiple
systems. The only requirement is Java needs a
runtime environment, i.e., JRE, which is a set of

[Link] Page 1 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

tools used for developing Java applications.


Memory Management: Garbage collected
language, i.e., deallocation of memory.
Exception Handling: Catches a series of errors or
abnormality, thus eliminating any risk of crashing
the system.

The Java Buzzwords


Java was modeled in its final form, keeping into
consideration the primary objective of having the
following features

Simple, Small, and Familiar

Object-Oriented

Portable and Platform Independent

Compiled and Interpreted

Scalability and Performance

Robust and Secure

Architectural-neutral

High Performance

Multi-Threaded

[Link] Page 2 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

Distributed

Dynamic and Extensible

Read here: Major features of Java programming

Primitive Data Types in Java

Data Type Default Value Size (in bytes)

1 byte = 8 bits

boolean FALSE 1 bit

char “ “ (space) 2 byte

byte 0 1 byte

short 0 2 byte

int 0 4 byte

long 0 8 byte

float 0.0f 4 byte

double 0.0d 8 byte

Non-Primitive Data Types

[Link] Page 3 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

Data Type

String

Array

Class

Interface

Typecasting
It is a method of converting a variable of one data
type to another data type to process these
variables correctly.

Java defines two types of typecasting:

Implicit Type Casting (Widening): Storing a


smaller data type to a larger data type.

Explicit Typecasting (Narrowing): Storing


variable of a larger data type to a smaller data
type.

Operators in Java
Java supports a rich set of operators that can be
classified as below :

[Link] Page 4 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

Operator Category Operators

Arithmetic operators +,-,/,*,%

Relational operators <, >, <=, >=,==, !=

Logical operators && , ||

Assignment operator =, +=, −=, ×=, ÷=, %=, &=,


^=, |=, <<=, >>=, >>>=

Increment and Decrement ++ , - -


operator

Conditional operators ?:

Bitwise operators ^, &, |

Special operators . (dot operator to access


methods of class)

Java IDE and Executing Code:


Amongst many IDEs, the most recommended ones
are :

Eclipse

NetBeans

Java code can also be written in any text editor

[Link] Page 5 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

and compiled on the terminal with the following


commands :

$ javac [file_name].java
$ java [file_name]

Note: Filename should be the same as the class


name containing the main() method, with a .java
extension.

Visit here to know more about Java IDE.

Variables in Java
Variables are the name of the memory location. It
is a container that holds the value while the java
program is executed. Variables are of three types
in Java :

Local Variable Global or Static Variable


Instance
Variable

Declared and Declared inside Declared using a


initialized inside the class but “static” keyword.
the body of the outside of the It cannot be

[Link] Page 6 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

method, block, method, block local.


or constructor. or constructor. If
not initialized,
the default value
is 0.

It has access Variables are Variables are


only within the created when an created to
method in which instance of the create a single
it is declared class is created copy in the
and is destroyed and destroyed memory shared
later from the when it is among all
block or when destroyed. objects at a
the function call class level.
is returned.

class TestVariables
{
int data = 20; // instance variable
static int number = 10; //static variab
le
void someMethod()
{
int num = 30; //local variable
}
}

[Link] Page 7 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

Reserved Words
Also known as keywords, particular words are
predefined in Java and cannot be used as variable
or object names. Some of the important keywords
are :

Keywords Usage

abstract used to declare an


abstract class.

catch used to catch exceptions


generated by try
statements.

class used to declare a class.

enum defines a set of constants

extends indicates that class is


inherited

final indicates the value cannot


be changed

finally used to execute code


after the try-catch
structure.

implements used to implement an


interface.

[Link] Page 8 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

new used to create new


objects.

static used to indicate that a


variable or a method is a
class method.

super used to refer to the


parent class.

this used to refer to the


current object in a
method or constructor.

throw used to throw an


exception explicitly.

throws used to declare an


exception.

try block of code to handle


an exception

Methods in Java
The general form of method :

Where type - the return type of the method


name - The name of the method
parameter list - sequence of type and variables
separated by a comma

[Link] Page 9 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

return - statement to return value to calling routine

type name (parameter list)


{
//body of the method
//return value (only if type is not voi
d)
}

Conditional Statements in Java


1. if-else

Tests condition, if condition true if block is


executed else the else block is executed.

class TestIfElse
{
public static void main(String args[])
{
int percent = 75;
if(percent >= 75
{
[Link]("Passed");
}
else

[Link] Page 10 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

{
[Link]("Please attempt agai
n!");
}
}
}

2. Switch

Test the condition; if a particular case is true, the


control is passed to that block and executed. The
rest of the cases are not considered further, and
the program breaks out of the loop.

class TestSwitch
{
public static void main(String args[])
{
int weather = 0;
switch(weather)
{
case 0 :
[Link]("Sunny");
break;
case 1 :
[Link]("Rainy");
break;

[Link] Page 11 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

case 2 :
[Link]("Cold");
break;
case 3 :
[Link]("Windy");
break;
default :
[Link]("Pleasant");
}
}
}

3. Loops in Java

Loops are used to iterate the code a specific


number of times until the specified condition is
true. There are three kinds of the loop in Java :

For Loop

Iterates the code a class TestForLoop


specific number of times {
until the condition is true. public static void
main (String arg
s[])
{
for(int i=0;i<=5;i

[Link] Page 12 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

++)
[Link]
n("*");
}
}

While Loop

If the condition in a while class TestWhileLoop


is true, the program
enters the loop for
iteration. {
public static void
main (String arg
s[])
{
int i = 1;
while(i<=10)
{
[Link]
n(i);
i++;
}
}
}

Do While Loop

The program enters the class TestDoWhileL

[Link] Page 13 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

loop for iteration at least oop


once irrespective of the {
while condition being public static void
true. For further main (String arg
iterations, it depends on s[])
the while condition to be {
true. int i = 1;
do
{
[Link]
n(i);
i++;
}
while(i<=10);
}
}

Java OOPS Concepts


An object-oriented paradigm offers the following
concepts to simplify software development and
maintenance.

1. Object and Class

Objects are basic runtime entities in an object-


oriented system, which contain data and code to

[Link] Page 14 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

manipulate data. This entire set of data and code


can be made into user-defined data types using
class concepts. Hence, a class is a collection of
objects of a similar data type.

Example: apple, mango, and orange are members


of class fruit.

2. Data Abstraction and Encapsulation

The wrapping or enclosing up of data and methods


into a single unit is known as encapsulation. Take
medicinal capsule as an example; we don’t know
what chemical it contains; we are only concerned
with its effect.
This insulation of data from direct access by the
program is called data hiding. For instance, while
using apps, people are concerned about their
functionality and not their code.

3. Inheritance

Inheritance provides the concept of reusability; it is


how objects of one class (Child class or Subclass)
inherit or derive properties of objects of another
class (Parent class).

[Link] Page 15 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

Types of Inheritance in Java


Single Inheritance: The child class inherits
properties and behavior from a single parent
class.

Multilevel Inheritance: The child class inherits


properties from its parent class, which in turn
is a child class to another parent class.

Multiple Inheritance: When a child class has


two parent classes. In Java, this concept is
achieved by using interfaces.

Hierarchical Inheritance: When a parent class


has two child classes inheriting its properties.

class A
{
int i, j;
void showij() {
[Link]("i and j: " + i + "
" + j);
}
}
// Create a subclass by extending class
A.
class B extends A {

[Link] Page 16 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

int k;
void showk() {
[Link]("k: " + k);
}
void sum() {
[Link]("i+j+k: " + (i+j+
k));
}
}
class SimpleInheritance {
public static void main(String args[])
{
A objA = new A();
B objB = new B();
// The superclass may be used by itself
objA.i = 10;
objA.j = 20;
[Link]("Contents of objA:
");
[Link]();
[Link]();

/* The subclass can access to all publi


c members of
its superclass. */

objB.i = 7;
objB.j = 8;

[Link] Page 17 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

objB.k = 9;
[Link]("Contents of objB:
");
[Link]();
[Link]();
[Link]();
[Link]("Sum of i, j and k i
n objB:");
[Link]();
}
}

Some limitations in Inheritance :

The subclass cannot derive private members


of the superclass.

The subclass cannot inherit constructors.

There can be one superclass to a subclass.

4. Polymorphism

Defined as the ability to take more than one form.


Polymorphism allows creating clean and readable
code.

In Java Polymorphism, the concept of method


overloading and method overriding is achieved,

[Link] Page 18 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

which is the dynamic approach.

4.1. Method Overriding

In a class hierarchy, when a method in a child class


has the same name and type signature as a
method in its parent class, then the method in the
child class is said to override the method in the
parent class.

If we don’t override the method in the code below,


the output would be 4 as calculated in ParentMath
class; otherwise, it would be 16.

class ParentMath
{
void area()
{
int a =2;
[Link]("Area of Square with
side 2 = %d %n", a * a);
[Link]();
}
}
class ChildMath extends ParentMath
{
void area()

[Link] Page 19 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

{
int a =4;
[Link]("Area of Square with
side 4= %d %n", a * a);
}
public static void main (String args[])
{
ChildMath obj = new ChildMath();
[Link]();
}
}

4.2. Method Overloading

Java programming can have two or more methods


in the same class sharing the same name, as long
as their arguments declarations are different. Such
methods are referred to as overloaded, and the
process is called method overloading.

Three ways to overload a method :

 Number of parameters

example: add(int, int)


add(int, int, int)

[Link] Page 20 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

 The data type of parameters

example add(int, int)


add(int, float)

 The sequence of the data type of parameters

example add(int, float)


add(float, int)

Program to explain multilevel inheritance and


method overloading :

class Shape
{
void area()
{
[Link]("Area of the followi
ng shapes are : ");
}
}
class Square extends Shape
{
void area(int length)
{

[Link] Page 21 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

//calculate area of square


int area = length * length;
[Link]("Area of square : "+
area);
}
}
class Rectangle extends Shape
{
//define a breadth
void area(int length,int breadth)
{
//calculate area of rectangle
int area = length * breadth;
[Link]("Area of rectangle :
" + area);
}
}
class Circle extends Shape
{
void area(int breadth)
{
//calculate area of circle using length
of the shape class as radius
float area = 3.14f * breadth * breadth;
[Link]("Area of circle : "
+ area);
}
}

[Link] Page 22 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

class InheritanceOverload
{
public static void main(String[] args)
{
int length = 5;
int breadth = 7;
Shape s = new Shape();
//object of child class square
Square sq = new Square();
//object of child class rectangle
Rectangle rec = new Rectangle();
//object of child class circle
Circle cir = new Circle();
//calling the area methods of all child
classes to get the area of different ob
jects
[Link]();
[Link](length);
[Link](length,breadth);
[Link](length);
}
}

Abstract Class
Superclass only defines a generalized form shared
by all of its subclasses, leaving it to each subclass

[Link] Page 23 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

to implement its methods.

abstract class A {
abstract void callme();
// concrete methods are still allowed i
n abstract classes
void callmetoo() {
[Link]("This is a concrete
method.");
}
}
class B extends A {
void callme() {
[Link]("B's implementation
of callme.");
}
}
class Abstract {
public static void main(String args[])
{
B b = new B();
[Link]();
[Link]();
}
}

[Link] Page 24 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

Interfaces
A class’s interface can be fully abstracted from its
implementation using the “interface” keyword.
Thus, they are similar to class except that they
lack instance variables, and their methods are
declared without anybody.

Several classes can implement an interface.

Interfaces are used to implement multiple


inheritances.

Variables are public, final, and static.

A class must create a complete set of


methods as defined by an interface to
implement an interface.

Classes implementing interfaces can define


methods of their own.

interface Area
{
final static float pi = 3.14F;
float compute(float x , float y);
}
class Rectangle implements Area
{

[Link] Page 25 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

public float compute (float x, float y)


{
return (x*y);
}
}
class Circle implements Area
{
public float compute (float x, float y)
{
return (pi * x * x);
}
}
class InterfaceTest
{
public static void main (String args[])
{
float x = 2.0F;
float y = 6.0F;
Rectangle rect = new Rectangle(); //cre
ating object
Circle cir = new Circle();
float result1 = [Link](x,y);
[Link]("Area of Rectangle =
"+ result1);
float result2 = [Link](x,y);
[Link]("Area of Circle = "+
result2);
}

[Link] Page 26 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

Constructors in Java
A constructor initializes an object on creation.

They have the same name as the class.

They do not have any return type, not even


void.

The constructor cannot be static, abstract, or


final.

Constructors can be :

Non-Parameterized or Default Constructor:


Invoked automatically even if not declared.

class Box {
double width;
double height;
double depth;
// This is the constructor for Box.
Box() {
[Link]("Constructing Box");
width = 10;
height = 10;

[Link] Page 27 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

depth = 10;
}
// compute and return volume
double volume() {
return width * height * depth;
}
}
class BoxVol {
public static void main(String args[])
{
// declare, allocate, and initialize Bo
x objects
Box mybox1 = new Box();
Box mybox2 = new Box();
double vol;
vol = [Link]();
[Link]("Volume is " + vol);
vol = [Link]();
[Link]("Volume is " + vol);
}
}

Parameterized: Used to initialize the fields of


the class with predefined values from the user.

class Box {
double width;

[Link] Page 28 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

double height;
double depth;
Box(double w, double h, double d) {
width = w;
height = h;
depth = d;
}
double volume() {
return width * height * depth;
}
}
class BoxVolP {
public static void main(String args[])
{
Box mybox1 = new Box(10, 20, 15);
Box mybox2 = new Box(3, 6, 9);
double vol;
vol = [Link]();
[Link]("Volume is " + vol);
vol = [Link]();
[Link]("Volume is " + vol);
}
}

Learn more about Java Constructor.

Arrays in Java
[Link] Page 29 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

An array is a group of like-type variables referred


by a common name, having continuous memory.
Primitive value objects are stored in an array. It
provides code optimization since we can sort data
efficiently and also access it randomly. The only
flaw is that we can have a fixed-size element in an
array.

There are two kinds of arrays defined in Java:

Single Dimensional: Elements are stored in a


single row

`import [Link];`

`class SingleArray`
`{`

`public static void main(String args[])`


`{`

`[Link]("Enter the length in


the array: ");`

`Scanner sc = new Scanner([Link]);`


`int len = [Link]();`

`int[] numbers = new int [len];`


`[Link]("Enter the elements in

the array: ");`

[Link] Page 30 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

`// int n = [Link]();`


`for(int i=0;i<len;i++)`

`{`
`numbers[i] = [Link]();`

`}`
`[Link]("The elements in the

array are: ");`


`for(int i=0;i<len;i++)`
`{`

`[Link](numbers[i] + " ");`


`}`

`[Link]();`
`[Link]("The sum of elements in

the array are: ");`


`int sum =0;`

`for(int i=0;i<len;i++)`
`{`
`sum = sum + numbers[i];`

`}`
`[Link]("Sum of elements = " +

sum);`
`}`

`}``
`

[Link] Page 31 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

Multi-Dimensional: Elements are stored as row


and column

class MatrixArray
{
public static void main(String args[])
{
int [][] m1 = {{1,2,1},{2,1,1},{1,1,2}};
int [][] m2 = {{2,2,2},{1,1,1},{2,1,2}};
int [][] sum = new int [3][3];
//printing matrix
[Link]("The given matrices are : ");
for(int a=0;a<[Link];a++)
{
for(int b=0;b<[Link];b++)
{
[Link](m1[a][b] + " ");
}
[Link]();
}
[Link]();
for(int a=0;a<[Link];a++)
{
for(int b=0;b<[Link];b++)
{

[Link] Page 32 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

[Link](m2[a][b] + " ");


}
[Link]();
}
//matrix addition
[Link]("The sum of given 2 matrices is
: ");
for(int a=0;a<[Link];a++)
{
for(int b=0;b<[Link];b++)
{
sum[a][b] = m1[a][b] + m2[a][b];
[Link](sum[a][b] + " ");
}
[Link]();
}
}
}

Strings in Java
Strings are a non-primitive data type that

[Link] Page 33 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

represents a sequence of characters.

String type is used to declare string variables.

An array of strings can also be declared.

Java strings are immutable; we cannot change


them.

Whenever a string variable is created, a new


instance is created.

Creating String

Using Literal Using new keyword

String name = “John” ; String s = new String();

String Methods

The String class, which implements the


CharSequence interface, defines several methods
for string manipulation tasks. The list of most
commonly used string methods are mentioned
below:

Method Task Performed

[Link] Page 34 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

toLowerCase() converts the string to


lower case

toUpperCase() converts the string to


upper case

replace(‘x’, ‘y’) replaces all appearances


of ‘x’ with ‘y’

trim() removes the whitespaces


at the beginning and the
end

equals() returns ‘true’ if strings are


equal

equalsIgnoreCase() returns ‘true’ if strings are


equal, irrespective of case
of characters

length() returns the length of the


string

CharAt(n) gives the nth character of


the string

compareTo() returns negative i


f string 1 < strin
g 2
positive if strin
g 1 > string 2
zero if string 1
= string 2

[Link] Page 35 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

concat() concatenates two strings

substring(n) returns substring


returning from character n

substring(n,m) returns a substring


between n and ma
character.

toString() creates the string


representation of the
object

indexOf(‘x’) returns the position of the


first occurrence of x in
the string.

indexOf(‘x’,n) returns the position of


after nth position in the
string

ValueOf (Variable) converts the parameter


value to the string
representation

Program to show Sorting of Strings:

class SortStrings {
static String arr[] = {
"Now", "the", "is", "time", "for", "al

[Link] Page 36 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

l", "good", "men",


"to", "come", "to", "the", "aid", "of",
"their", "county"
};
public static void main(String args[])
{
for(int j = 0; j < [Link]; j++)
{
for(int i = j + 1; i < [Link]; i++)
{
if(arr[i].compareTo(arr[j]) < 0)
{
String t = arr[j];
arr[j] = arr[i];
arr[i] = t;
}
}
[Link](arr[j]);
} }
}

String Buffer and String Builder

For mutable strings, we can use StringBuilder


and StringBuffer classes which as well
implement the CharSequence interface.

These classes represent growable and

[Link] Page 37 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

writable character interfaces.

They automatically grow to make room for


additions and often has more characters
preallocated than are actually needed to allow
room for growth.

Difference between length() and capacity()

length(): To find the length of StringBuffer

capacity(): To find the total allocated capacity

/* StringBuffer length vs. capacity */

class StringBufferTest {
public static void main(String args[])
{
StringBuffer sb = new StringBuffer("Hel
lo");
[Link]("buffer = " + sb);
[Link]("length = " + [Link]
gth());
[Link]("capacity = " + sb.c
apacity());
}
}

[Link] Page 38 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

StringBuilder versus StringBuffer

String Builder String Buffer

Non-Synchronized: hence Synchronized


efficient.

Threads are used Thread Safe


multithreading.

Multithreading
Multitasking: Process of executing multiple tasks
simultaneously to utilize the CPU.

This can be achieved in two ways:

Process-based multitasking.
(Multitasking)

Thread-based multitasking
(Multithreading)

Multitasking vs. Multithreading

[Link] Page 39 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

Multitasking Multithreading

OS concept in which Concept of dividing a


multiple tasks are process into two or more
performed subprocesses or threads
that are executed
simultaneously. simultaneously in parallel.

Multiple programs can be Supports the execution of


executed simultaneously. multiple parts of a single
program simultaneously.

The process has to switch The processor needs to


between different switch between different
programs or processes. parts or threads of the
program.

less efficient highly efficient

program or process in the thread is the smallest unit


smallest unit in the
environment

cost-effective expensive

Life Cycle Of Thread


A thread is always in one of the following five
states; it can move from one state to another in a
variety of ways, as shown.

[Link] Page 40 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

New thread: Thread object is created. Either it


can be scheduled for running using the start()
method.

Runnable thread: The thread is ready for


execution and waiting for the processor.

Running thread: It has got the processor for


execution.

Blocked thread: Thread is prevented from


entering into a runnable state.

Dead State: Running thread ends its life when


it has completed executing its run() method.

Creating Thread

Extending Thread class

Implementing Runnable interface

[Link] Page 41 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

Common Methods Of Thread Class

Method Task Performed

public void run() Inherited by class


MyThread

It is called when the


thread is started. Thus
all the action takes
place in run()

public void start() Causes the thread to


move to a runnable state.

public void sleep(long Blocks or suspends a

[Link] Page 42 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

milliseconds) thread temporarily for


entering into runnable and
subsequently in running
state for specified
milliseconds.

public void yield Temporarily pauses


currently executing thread
object and allows other
threads to be executed.

public void suspend() to suspend the thread,


used with resume()
method.

public void resume() to resume the suspended


thread

public void stop() to cause premature death


of thread, thus moving it
to a dead state.

Program to create threads using thread class.

class A extends Thread


{
public void run()
{
for(int i=1;i<=5;i++)
{

[Link] Page 43 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

[Link]("From thread A : i "


+ i);
}
[Link]("Exit from A ");
}
}
class B extends Thread
{
public void run()
{
for(int i=0;i<=5;i++)
{
[Link]("From thread B : i "
+ i);
}
[Link]("Exit from B ");
}
}
class C extends Thread
{
public void run ()
{
for(int k=1;k<=5;k++)
{
[Link]("From thread C : k "
+ k);
}
[Link]("Exit from C ");

[Link] Page 44 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

}
}
class ThreadTest
{
public static void main(String args[])
{
new A().start();
new B().start();
new C().start();
}
}

Implementing Runnable Interface

The run( ) method is declared in the Runnable


interface is required for implementing threads in
our programs.

The process consists of the following steps :

Class declaration implementing the


Runnable interface

Implementing the run() method

Creating a thread by defining an


object that is instantiated from this
“runnable” class is the thread's target.

[Link] Page 45 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

Calling the thread’s start() method to


run the thread.

Using Runnable Interface

class X implements Runnable


{
public void run()
{
for(int i=0;i<=10;i++)
{
[Link]("Thread X " + i);
}
[Link]("End of thread X ");
}
}
class RunnableTest
{
public static void main(String args[])
{
X runnable = new X ();
Thread threadX = new Thread(runnable);
[Link]();
[Link]("End of main Threa
d");
}
}

[Link] Page 46 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

Thread Class vs. Runnable


Interface

Thread Class Runnable Interface

A derived class extending The runnable interface


Thread class itself is a simply defines the unit of
thread object and gains work executed in a
full control over the thread, so it doesn’t
thread life cycle. control the thread life
cycle.

The derived class cannot Allows to extend base


extend other base classes classes if necessary

Used when a program Used when a program


needs control over the needs the flexibility of
thread life cycle extending classes.

Exception Handling in Java


The exception is an abnormality or error condition
caused by a run-time error in the program; if this
exception object thrown by the error condition is
not caught and handled properly, the interpreter
will display an error message. If we want to avoid
this and want the program to continue, we should

[Link] Page 47 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

try to catch the exceptions. This task is known as


exception handling.

Common Java Exceptions

Exception Type Cause of Exception

ArithmeticException caused by math errors

ArrayIndexOutOfBoundException
caused by bad array
indexes

ArrayStoreException caused when a program


tries to store the wrong
data type in an array

FileNotFoundException caused by an attempt to


access a nonexistent file

IOException caused by general I/O


failures.

NullPointerException caused by referencing a


null object.

NumberFormatException caused when a


conversion between
strings and number fails.

OutOfMemoryException caused when there is not


enough memory to
allocate

[Link] Page 48 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

StringIndexOutOfBoundException
caused when a program
attempts to access a non-
existent character
position in a string.

Exceptions in java can be of two types:

Checked Exceptions

Handled explicitly in the code itself with


the help of try-catch block.

Extended from java. [Link] class

Unchecked Exceptions

Not essentially handled in the program


code; instead, JVM handles such
exceptions.

Extended from [Link]


class

Try and Catch

Try keyword is used to preface a block of code


that is likely to cause an error condition and
“throw” an exception. The keyword catch defines a

[Link] Page 49 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

catch block “catches” the exception “thrown” by


the try block and handles it appropriately.

A code can have more than one catch statement in


the catch block; when an exception in the try block
is generated, multiple catch statements are treated
like cases in a switch statement.

Using Try and Catch for Exception Handling

class Error
{
public static void main(String args[])
{
int a [] = ;
int b = 5;
try
{
int x = a[2]/b-a[1];
}
catch(ArithmeticException e)
{
[Link]("Division by zero");
}
catch(ArrayIndexOutOfBoundsException e)
{
[Link]("ArrayIndexError");

[Link] Page 50 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

}
catch(ArrayStoreException e)
{
[Link]("Wrong data type");
}
int y = a[1]/a[0];
[Link]("y = " + y);
}
}

Finally

Finally, statement: used to handle exceptions that


are not caught by any previous catch statements.
A final block is guaranteed to execute, regardless
of whether or not an exception is thrown.

We can edit the above program and add the


following final block.

finally
{
int y = a[1]/a[0];
[Link]("y = " + y);
}

Throwing Your Own Exception


[Link] Page 51 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

Own exceptions can be defined using the throw


keyword.

throw new Throwable subclass;

/* Throwing our own Exception */

import [Link];
class MyException extends Exception
{
MyException(String message)
{
super(message);
}
}
class TestMyException
{
public static void main(String args[])
{
int x = 5 , y = 1000;
try
{
float z = (float) x / (float) y ;
if(z < 0.01)
{
throw new MyException("Number is too sm
all");

[Link] Page 52 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

}
}
catch (MyException e)
{
[Link]("Caught my exception
");
[Link]([Link]());
}
finally
{
[Link]("I am always here");
}
}
}

Managing Files in Java


Storing data in variables and arrays poses the
following problems:

Temporary Storage: The data is lost when the


variable goes out of scope or when the
program is terminated.

Large data: It is difficult.

Such problems can be solved by storing data on


secondary devices using the concept of files.

[Link] Page 53 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

Collection of related records stored in a particular


area on the disk termed as the file. The files store
and manage data by the concept of file handling.

Files processing includes:

Creating files

Updating files

Manipulation of data

Java provides many features in file management


like :

Reading/writing of data can be done at the


byte level or character or fields depending
upon the requirement.

It also provides the capability to read/write


objects directly.

Streams
Java uses the concept of streams to represent an
ordered sequence of data, a path along which data
flows. Thus, it has a source and a destination.

Streams are classified into two basic types :

[Link] Page 54 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

Input Stream: extracts, i.e., reads data from


the source file and sends it to the program.

Output Stream: which takes the data from the


program and sends, i.e., writes to the
destination.

Stream Classes
They are contained in the [Link] package.

They are categorized into two groups.

Byte Stream Classes: provides support for


handling I/O operation on bytes.

Character Stream Classes: provides support


for managing I/O operations on characters.

Bytes Stream Classes

Designed to provide functionality for creating and


manipulating streams and files for reading/writing
bytes.

Since streams are unidirectional, there are two


kinds of byte stream classes :

[Link] Page 55 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

Input Stream Classes

Output Stream Classes

Input Stream Classes

They are used to read 8-bit bytes include a


superclass known as InputStream. InputStream is
an abstract class and defines the methods for
input functions such as :

Method Description

read( ) Reads a byte from the


input stream

read(byte b [ ]) Reads an array of bytes


into b

read(byte b [ ], int n, int Reads m bytes into b


m) starting from the nth byte
of b

available( ) Tells the number of bytes


available in the input

skip(n) Skips over n bytes from


the input stream

reset ( ) Goes back to the


beginning of the stream

[Link] Page 56 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

close ( ) Closes the input stream

Output Stream Classes

These classes are derived from the base class


OutputStream. OutputStream is an abstract class
and defines the methods for output functions such
as :

Method Description

write( ) Writes a byte to the


output stream

write(byte b[ ]) Writes all the bytes in the


array b to the output
stream

write(byte b[ ], int n, int Writes m bytes from array


m) b starting from the nth
byte

close( ) Closes the output stream

flush( ) Flushes the output stream

Reading/Writing Bytes

[Link] Page 57 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

Two common subclasses used are FileInputStream


and FileOutputStream that handle 8-bit bytes.

FileOutputStream is used for writing bytes to a file


as demonstrated below:

// Writing bytes to a file

import [Link].*;
class WriteBytes
{
public static void main(String args[])
{
bytes cities [] = {'C','A','L','I','
F','O','R','N','I','A', '\n', 'V','E','
G','A','S','\n','R','E','N','O','\n'};
//Create output file stream
FileOutputStream outfile = null;
try
{
//connect the outfile stream to "city.t
xt"
outfile = new FileOutputStream("[Link]
t");
//Write data to the stream
[Link](cities);
[Link]();

[Link] Page 58 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

}
catch(IOException ioe)
{
[Link](ioe);
[Link](-1);
}
}
}

FileIntputStream is used for reading bytes from a


file, as demonstrated below:

//Reading bytes from a file

import [Link].*;
class ReadBytes
{
public static void main(String args[])
{
//Create an input file stream
FileInputStream infile = null;
int b;
try
{
//connect the infile stream to required
file
infile = new FileInputStream(args [ 0

[Link] Page 59 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

]);
//Read and display
while( (b = [Link] ( ) ) !=-1)
{
[Link]((char) b );
}
[Link]();
}
catch(IOException ioe)
{
[Link](ioe);
[Link](-1);
}
}
}

Character Stream Classes

Two kinds of character stream classes:

Reader Stream Classes

Designed to read characters from the files.

Class Reader is the base class for all other


classes.

These classes are similar to input stream


classes except for their fundamental unit of

[Link] Page 60 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

information, while the reader stream uses


characters.

Writer Stream Classes

Performs all output operations on files.

Writes characters

The Writer class is an abstract class that is the


base class, having methods identical to
OutputStream.

Reading/Writing Characters

The two subclasses of Reader and Writer classes


for handling characters in files are FileReader and
FileWriter.

// Copying characters from one file to another

import [Link].*;
class CopyCharacters
{
public static void main (String args[])
{
//Declare and create input and output f
iles

[Link] Page 61 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

File inFile = new File("[Link]");


File outFile = new File("[Link]");
FileReader ins = null; //creates file s
tream ins
FileWriter outs = null; //creates file
stream outs
try
{
ins = new FileReader(inFile); //opens i
nFile
outs = new FileWriter(outFile); //opens
outFile
//Read and write
int ch;
while((ch = [Link]( ))!=-1)
{
[Link](ch);
}
}
catch(IOException e)
{
[Link](e);
[Link](-1);
}
finally
{
try
{

[Link] Page 62 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

[Link]();
[Link]();
}
catch (IOException e)
{}
}
}
}

Java Collections
The collections framework is contained in [Link]
package defines a set of interfaces and their
implementations to manipulate collections, which
serve as containers for a group of objects.

Interfaces

The collection framework contains many interfaces


such as Collection, Map and Iterator.

The interfaces and their description are mentioned


below:

Interface Description

Collection collection of elements

[Link] Page 63 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

List (extends Collection) sequence of elements

Queue (extends the special type of list


Collection)

Set (extends Collection) collection of unique


elements

SortedSet (extends Set) sorted collection of


unique elements

Map collection of key and


value pairs, which must
be unique

SortedMap (extends Map) sorted collection of key-


value pairs

Iterator an object used to traverse


through a collection

List (extends Iterator) the object used to


traverse through a
sequence

Classes

The classes available in the collection framework


implement the collection interface and sub-
interfaces. They also implement Map and Iterator
interfaces.

[Link] Page 64 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

Classes and their Corresponding interfaces are


listed :

Class Interface

AbstractCollection Collection

AbstarctList List

Abstract Queue

AbstractSequentialList List

LinkedList List

ArrayList List, Cloneable and


Serializable

AbstractSet Set

EnumSet Set

HashSet Set

PriorityQueue Queue

TreeSet Set

Vector List, Cloneable and


Serializable

Stack List, Cloneable and


Serializable

Hashtable Map, Cloneable and


Serializable

[Link] Page 65 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

Array List Implementation

// Using the methods of array list class

import [Link].*;
class Num
{
public static void main(String args[])
{
ArrayList num = new ArrayList ();
[Link](9);
[Link](12);
[Link](10);
[Link](16);
[Link](6);
[Link](8);
[Link](56);
//printing array list
[Link]("Elements : ");
[Link]((s) -> [Link](
s));
//getting size
[Link]("Size of array list
is: ");
[Link]();
//retrieving specific element

[Link] Page 66 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

int n = (Integer) [Link](2);


[Link](n);
//removing an element
[Link](4);
//printing array list
[Link]("Elements : ");
[Link]((s) -> [Link](
s));
}
}
Linked List Implementation
import [Link];
class LinkedList
{
public static void main (String args[])
{
Scanner s = new Scanner([Link]);
List list = new List();
[Link]("Enter the number of
elements you want to enter in LL : ");
int num_elements = [Link]();
int x;
for(int i =0;i<=num_elements;i++)
{
[Link]("Enter element : ");
x = [Link]();
[Link](x);
}

[Link] Page 67 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

[Link](">>>>> LINKED LIST A


FTER INSERTION IS : ");
[Link]();
int size = [Link]();
[Link](">>>>> SIZE OF LL =>
"+size);
[Link]("Enter the node to b
e inserted in the middle: ");
int mid_element = [Link]();
[Link](mid_element);
[Link](">>>> LL AFTER INSER
TING THE NEW ELEMENT IN THE MIDDLE ");
[Link]();
}
}

HashSet Implementation

import [Link].*;
class HashSetExample
{
public static void main(String args[])
{
HashSet hs = new HashSet();
[Link]("D");
[Link]("W");
[Link]("G");
[Link]("L");

[Link] Page 68 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

[Link]("Y");
[Link]("The elements availa
ble in the hash set are :" + hs);
}
}

Tree Set Implementation

import [Link].*;
class TreeSetExample
{
public static void main(String args[])
{
TreeSet ts = new TreeSet();
[Link]("D");
[Link]("W");
[Link]("G");
[Link]("L");
[Link]("Y");
[Link]("The elements availa
ble in the tree set are :" + ts);
}
}

Vector Class Implementation

import [Link].*;

[Link] Page 69 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

class VectorExample
{
public static void main(String args[])
{
Vector fruits = new Vector ();
[Link]("Apple");
[Link]("Orange");
[Link]("Grapes");
[Link]("Pineapple");
Iterator it = [Link]();
while ([Link]())
{
[Link]([Link]);
}
}
}

Stack Class Implementation

import [Link].*;
public class StackExample
{
public static void main (String args[])
{
Stack st = new Stack ();
[Link]("Java");
[Link]("Classes");
[Link]("Objects");

[Link] Page 70 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

[Link]("Multithreading");
[Link]("Programming");
[Link]("The elements in the
Stack : " + st);
[Link]("The elements at the
top of Stack : " + [Link]());
[Link]("The elements popped
out of the Stack : " + [Link]());
[Link]("The elements in the
Stack after pop of the element : " + s
t);
[Link]("The result of searc
h : " + [Link] ("r e"));
}
}

HashTable Class Implementation

import [Link].*;
public class HashTableExample
{
public static void main (String args[])
{
Hashtable ht = new Hashtable();
[Link]("Item 1","Apple");
[Link]("Item 2","Orange");
[Link]("Item 3","Grapes");
[Link]("Item 4","Pine");

[Link] Page 71 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

[Link]("Item 5","Kiwi");
Enumeration e = [Link]();
while([Link]())
{
String str = (String) [Link]();
[Link]([Link](str));
}
}
}

Memory Management In Java


Memory is a collection of data represented in
binary format.

Memory management is :

Process of allocating new objects

Properly removing unused objects( garbage


collection)

[Link] Page 72 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

Example Illustrating Memory Management

When a method is called, the frame is created

[Link] Page 73 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

on the top of the stack.

Once a method is completed, the flow of


control returns to the calling method, and its
corresponding stack frame is flushed.

Local variables are created in the stack.

Instance variables are created in a heap and


are part of the object they belong to.

A reference variable is created in the stack.

Some Common Java Coding Questions

Enter radius and print diameter, perimeter, and


area

Here is the code:

import [Link];
class Circle
{
public static void main (String args
[])
{
double r,dia,peri,area ;
[Link]("Enter the radius of
circle : ");

[Link] Page 74 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

Scanner s = new Scanner ([Link]);


r = [Link]();
dia = 2*r;
peri = 2*[Link]*r;
area = [Link]*r*r;
[Link]("The dia of circle is
: %.2f \n", dia);
[Link]("The peri of circle i
s : %.2f \n", peri);
[Link]("The area of the circ
le is : %.2f \n", area);
}
}

Print all the even numbers between x and y.

Here is the code:

import [Link];
class EvenOdd
{
public static void main (String args[])
{
int x,y;
Scanner s = new Scanner ([Link]);
[Link]("Enter the values x
, y : ");

[Link] Page 75 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

x = [Link]();
y = [Link]();
[Link](" **** EVEN NUMBERS
BETWEEN GIVEN RANGE ARE **** >> ");
int count = x;
while(count <=y)
{
if(count % 2 == 0)
{
[Link](count);
}
count ++;
}
}
}

To check if the given number is prime

Here is the code:

import [Link];
class Prime
{
public static void main (String args[])
{
double num;
int n;

[Link] Page 76 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

boolean isPrime = true;


Scanner s = new Scanner([Link]);
[Link]("Enter the number to
check :");
num=[Link]();
n = (int) [Link](num);
for(int i=2;i<=n;i++)
{
if(num % i == 0)
{
isPrime = false;
}
else
{
isPrime = true;
}
}
if(isPrime)
{
[Link]("***** NUMBER IS PRI
ME !!!! ****** ");
}
else
{
[Link]("***** NUMBER IS NOT
PRIME !!!! ****** ");
}
}

[Link] Page 77 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

To check if the entered number is Palindrome

Here is the code:

import [Link];
class Palindrome
{
public static void main(String args[])
{
int num,reverse=0,mode;
Scanner s = new Scanner([Link]);
[Link]("Enter a number to c
heck for Palindrome: ");
num = [Link]();
int number = num;
while(num!=0)
{
//[Link](" number entering
= "+num);
mode = num % 10;
//[Link](" mode = "+mode);
reverse =(reverse * 10 )+ mode;
//[Link](" reverse = "+reve
rse);
num = num/10;

[Link] Page 78 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

//[Link](" new num = "+nu


m);
}
//[Link](" reverse out = "+
reverse);
if(reverse == number)
{
[Link](" **** PALINDROME
!!! **** ");
}
else
{
[Link](" **** NOT A PALINDR
OME !!! **** ");
}
}
}

Pattern printing

*
* *
* * *
* * * *
* * * * *

Here is the code:

[Link] Page 79 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

import [Link];
class TriStars
{
public static void main(String args[])
{
for(int i=0;i<=5;i++)
{
for(int j=0;j<i;j++)
{
[Link](" * ");
}
[Link]();
}
[Link]();
}
}

Summary

[Link] Page 80 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

Created in 1995, object-oriented programming,


Java, was developed to overcome the flaws of
modular programming. Java introduced concepts
like Abstraction, Encapsulation for robust and
secure code.

Java Programming Masterclass updated to


Java 17

Similarly, the concept of Polymorphism,


Inheritance, and Classes removed redundancy in
the code. In addition, Java offers Collection
Interface that implements data structures like
Arrays, Lists, HashMap, and more. Java is used in
various sectors like internet security, Android
Development, Web Development, and more.

Did you find this article helpful? Do you know other


applications of Java?

Comment below and share your learning with us!!

People are also reading:

Best Java Courses

Top 10 Java Certifications

[Link] Page 81 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

Best Java Books

Best Java Projects

Top Java Programming Interview Questions

How to learn Java?

Difference between Java vs. Javascript

Top 10 Java Frameworks

Best Way to Learn Java

Constructor in java

Prime Number Program in Java

Best Java Tutorials

Explore More
search...

[Link] Page 82 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

By Simran Kaur Arora


Simran works at Hackr as a technical writer. The
graduate in MS Computer Science from the well
known CS hub, aka Silicon Valley, is also an editor
of the website. She enjoys writing about any tech
topic, including programming, algorithms, cloud,
data science, and AI. Traveling, sketching, and
gardening are the hobbies that interest her.
View all post by the author

Learn More

HTML Doctype
How to Convert a Declaration | Docs HTML Text Color |
List to a String in With Examples Docs With Examples
Python (join,
Comprehensions) HTML Programming HTML Programming
Skills Web Skills Web
Python Development Development

[Link] Page 83 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

[Link] Page 84 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

[Link] Page 85 of 87
Java Cheat Sheet: Download PDF for Quick Reference 1/10/26, 12:55

CATALOG RESOURCES PRICING ACCOUNT COMPANY

Courses Projects Plans Dashboard About Us


Projects Blog For Students Premium Contact Us
Blog Cheat Sheets For Students Advertise /
Partner
User User
Resources Tutorials

Python Editor

[Link] Page 86 of 87

You might also like