Java: How do I print an array from another class? My array contains another array from that class
Okay so this is my code i know its messy and full of other errors, i I am still trying to learn. I know i could do it in one class but that takes away from the OOP portion of java. I figure if I am going to learn i may as well learn right. I have been trying to figure out how to print out that charHpArray for two days and everything i found on google has been useless because they dont contain another array . Essentially I am trying to make it so level works as the parameter, so when level = 1 hp is 5, and when level is 2 hp is 10 and so on. Also if you could tell me why level + # isnt working that would be great. //if you want to take a crack at that too, I am trying to make mage, arch, and war, all have different starting bonuses so war would have a little more health than the basic level bonus. ** ALL ANSWERS ARE ENCOURAGED, EVEN IF IT MEANS NEW IDEAS IM JUST TRYING TO LEARN** Thanks package rpg; import java.io.*; import java.util.Scanner; import java.util.Random; public class Main { public static void main(String[]args) { Scanner input = new Scanner(System.in); Random roll = new Random(); System.out.println("Welcome To Adventure Heroes"); System.out.println("-------------------"); System.out.println("You awake to the sound of screaming, \"GET AWAY FROM ME!\""); System.out.println("You call out to the voice in the distance..."); System.out.println("There is no answer"); System.out.println("You run towards the troubled screams in the distance"); System.out.println("You see a man on the floor being kicked, without hesitation you charge in and push the attacker off the man."); System.out.println("You examine the man to see if he is okay. When you look up the attacker is gone."); System.out.println("\"Thank you so much... erm, come to think of it I've never seen you around these parts. What is Your name?\""); String yourName = input.next(); System.out.println("\"What a weird name, Hi " + yourName + ", I'm Borgan\""); System.out.print("\"Well " + yourName + ", your