So as you will soon be able to tell, I am very new to this programming. But I thought that the best way to learn would be to just jump on in and create my own game. Was wondering what things I should learn to improve my craft.

here is the main class package Main;

import java.util.ArrayList;
import java.util.Scanner;

public class story {

public static void main(String[]args){
ArrayList<String> inventory= new ArrayList<String>();

int southnorth = 0;
boolean pretendtoberetarted = false;

firstmission obj = new firstmission();

System.out.println(" Would you like to start a game,"
+ "1 = Yes 2 = no");
boolean telek = false;

if(option == 1){
System.out.println("You have no idea who you are all that you have on you is
1000\$ and a map with your current");
System.out.println(" location on it and a firestarter,'PS: someone
must have put that map on you after drugging you");

obj.firstline();
}
else{
System.out.println(" Would you like to start a game,"
+ "1 = Yes 2 = no");

}

}
}


here is the firstmission classpackage Main;

 import java.util.ArrayList;
import java.util.Scanner;

public class firstmission {

int eastwest =0;
int southnorth = 0;
boolean telek = false;
boolean murderer = false;
boolean intownentrance = false;
boolean ownhouse = false;
boolean pretendedtobedisabled = false;
boolean shelterbuilt = false;

City cityGate = new City();

void firstline(){
System.out.println("Its very cold and getting dark very fast, you know that a
town is located about 10km north ");
System.out.println("of you but you have no clue as to which way north
is,");
System.out.println("the sun just set to your right");
System.out.println("------------------");
System.out.println(" 1 = forward");
System.out.println(" 2 = Backwards");
System.out.println(" 3 = random");
System.out.println(" -----------------");

switch (option){

case 1:
System.out.print(" You've been walking for roughly half a day now and you
System.out.println("just to your left it smells like rotten flesh, what do
you do?");
System.out.println("----------------");
System.out.println(" 1 = enter the cave ( WARNING IT SMELLS BAD)");
System.out.println(" 2 = Build a shelter");
System.out.println("----------------");

southnorth = -10;
System.out.println(" Your cordinateds are " + southnorth  + "kilometres
south, north and " + eastwest  + " kilometres east ,west");
System.out.println("Please note that the signs indicate the direction/
negative indicate south and west");

switch(option2){
case 1: System.out.println("You find an old wrinkled man who appears to
have been living here a while");
System.out.println(" he is leaning against the wall of the cave and
appears to be in a deep meditative state");
System.out.println(" just to his right their is a big crate of food
supplies, it could last you months");
System.out.println("what do you do?");
System.out.println("----------------");
System.out.println(" 1 = sit beside him a start to meditate");
System.out.println(" 2 = knock him out and take his food ");
System.out.println(" 3 = wake him up");
switch(option3){
case 1: System.out.println("You sit there for roughly a full day
meditating, why? you dont know, maybe you");
System.out.println(" are hoping for what this man seems to have");
System.out.println("after this elasped time the man starts speaking
to you he says very calmly");
System.out.println("' won tong youza noww minee new sudent pwease'");
System.out.println("to this you reply sure, you have pretty much
given up on life and this seems like the only viable option.");
System.out.println(" So it goes that you spend years and years in isolation with your new master and he shows you many things");
System.out.println("eventually you attain pure internal happiness and you live a good life.");
System.out.println(" Your master has also taught you how to control matter with your mind and how ");
System.out.println("never be hungry again through mastering breathing techniques, you now decide to venture off to the town.");

southnorth = 10;
telek = true;
break;

case 2: System.out.println(" Instead of knocking out the man you end up killing him, a few seconds later you hear footsteps around the corner.");
System.out.println(" A small asian woman appears around the corner yelling 'Bing bong you killa my muster, now I must kiwl yousa");
System.out.println(" You instanly kill her with a quick punch and then decide to head to bed");
System.out.println("You wake up and it is somewhat warm outside, now that you know that you headed in the wrong direction do you retrace your steps"
+ " 1 = retrace steps back to town ' will take you a full days treck to reach the town now'"
+ " 2 = continue with what must be south");

switch(option4){
case 1: southnorth = 10;

break;

case 2: southnorth = -30;
}

break;

case 3: System.out.println(" The man dies instantly, you hear footsteps coming from around the corner");
System.out.println(" A small asian woman appears around the corner yelling 'Bing bong you killa my muster, now I must kiwl yousa");
System.out.println(" You instanly kill her with a quick punch and then decide to head to bed");
System.out.println("You wake up and it is somewhat warm outside, now that you know that you headed in the wrong direction do you retrace your steps");
System.out.println("----------------------");
System.out.println(" 1 = retrace steps back to town ' will take you a full days treck to reach the town now'");
System.out.println(" 2 = continue with what must be south");
System.out.println("----------------------");

switch(option5){
case 1: southnorth = 10;

break;

case 2: southnorth = -30;
}
}
break;

case 2: System.out.println(" You build a somewhat decent shelter that will make do while you are out"
+ " while you are out here surviving, you go to bed for the night");
System.out.println("You wake up and it is somewhat warm outside, now that you know that you headed in the wrong direction");
System.out.println(" do you retrace your steps?");
System.out.println("-----------------------");
System.out.println("1 = retrace steps back to town ' will take you a full days treck to reach the town now'");
System.out.println( "2 = continue with what must be south");
System.out.println("-----------------------");
shelterbuilt= true;

switch(option6){
case 1: southnorth = 10;

break;

case 2: southnorth = -30;
}

break;
}
}

if(southnorth == 10){

City.cityGate();

}
}

}


any my city class package Main;

import java.util.Scanner;

public class City {

static int southnorth;

static void cityGate(){
System.out.println("-------------------");
System.out.println("Welcome to Calgary");
System.out.println("-------------------");
System.out.println("You arrive at the town, it has a small wooden wall
around it and a guard standing at the gate.");
System.out.println(" what do you do?");
System.out.println(" Ask politely to enter the town = 1");
System.out.println(" Ask forcefully to enter the town = 2");
System.out.println(" pretend you are disabled ( who would deny a disabled
person entry)= 3");

boolean intownentrance;
switch(option){

case 1:
System.out.println("The guard tells you to turn away");
cityGate();
break;

case 2:
intownentrance = true;
System.out.println("You are now in the town, its a rather small town with only about 1000 people living there.");

System.out.println(" What would you like to do ?");
System.out.println("Go to bar = 1");
System.out.println(" Go to inn = 2");
System.out.println(" leave town = 3");

switch(option3){

}

• The code of the City class is incomplete. The package Main is not formatted correctly. – Roland Illig Jun 26 at 5:20

• You naming convention is clear, it reflects the problem domain but doesn't follow the Java style. Classes definitions should have a capitalised first letter. Use camelCase for method names to make them easier to read FirstMission class or firstLine method..
• Avoid using System.out create a show method that is easy to refactor to display the text. During development use something like [slf4j][1] longer term you more easily replace this with whatever UI system you choose.
• In your Story class Use a switch statement for your option instead of if(option == 1)` like you have done in your firstmission class.