Skip to content

Instantly share code, notes, and snippets.

@lb7n
Last active August 29, 2015 14:05
Show Gist options
  • Save lb7n/65a855665c29f3e1bcdb to your computer and use it in GitHub Desktop.
Save lb7n/65a855665c29f3e1bcdb to your computer and use it in GitHub Desktop.
import java.util.ArrayList;
public class MainClass {
public static void main(String[] args)
{
String NAME = "Lauren Basmajian";
String ADDRESS = "Alderaan";
String RESERVATION = "Boat Rental";
String SPACE = " ";
String LINEBR = "\n";
double COST = 420.666;
String[] RESERVATIONS = new String[4];
RESERVATIONS[0] = "party in the USA";
RESERVATIONS[1] = "house rental";
RESERVATIONS[2] = "disney world";
RESERVATIONS[3] = "x-wing fighter rental";
int RESERVATIONSLength = RESERVATIONS.length;
for (int i = 0; i < RESERVATIONSLength; i++) {
System.out.println(RESERVATIONS[i]);
}
/*
* if there is an exclamation point at the begining of booleqn, it’s
* checking to see if the boolean is false. if there
*
* isn’t, it’s checking to see if it’s true
*/
boolean ALLOWED = false;
if (!ALLOWED) {
System.out.println("this is allowed");
}
else {
System.out.println("this is not allowed");
}
if (COST < 420) {
System.out.println("This is some weak ass shit");
}
else {
System.out.println("dis some danky dank");
}
/* == is only used to compare if two NUMBER values are the same */
if (COST == 420.666) {
System.out.println("Hail Satan");
}
/* OBJECTS! */
ArrayList<String> RESERVATIONS2 = new ArrayList<String>();
RESERVATIONS2.add(NAME + LINEBR + ADDRESS);
RESERVATIONS2.add(RESERVATIONS[3]);
System.out.println(RESERVATIONS2.size());
for (int i = 0; i < RESERVATIONS2.size(); i++) {
RESERVATIONS2.get(i);
System.out.println(RESERVATIONS2.get(i));
}
int FEED = 100;
String FEEDER = "STOP FEEDING U N00B";
for (int i = 0; i < FEED; i++) {
RESERVATIONS2.add(FEEDER);
System.out.println(FEEDER);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment