Show Menu
Cheatography

java programming Cheat Sheet by

java cheatsheet

data types

byte
8 bits
shoryt
16 bits
int
32 bits
long
64 bits
boolean
bit
char
16 bits unicode
float
32 bits decimal
double
64 bits decimal

Function

System.ou­­t.p­­r­int()
print in the same line
System.ou­t.p­rin­tln()
print in the different line
public static
modifier
charAT()
Return the character at the specified index
Boolean
True or False

Swap

Public class Main {

    public static void swap(int[] list, int e1, int e2){
   int temp;
        temp = list[e1];
        temp = list[e2];
        list[e2] = list[e1];
        list[e1] = temp;

        for (int i : list){
            System.out.println(i);
        }

    }

    public static void main(String[] args) {
        int[] mylist = new int[]{1,2,3,4,5};

        swap(mylist, 1, 2);

    }
}
 

object

class
a blue print for an object
object
an instance of a class
package
Organi­zation of a class

Vocab

Program Execution
Running program
Java Bytecodes
the instru­­ction set of the Java virtual machine.
Java Virtual Machine (JVM)
an abstract computing machine that enables a computer to run a Java program.
   
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Cypressio Cheat Sheet
          Selenium WebDriver Cheat Sheet Cheat Sheet
          ISTQB Test Automation Engineering Cheat Sheet

          More Cheat Sheets by ppinkyy