Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: I dont know what to do with this code

  1. #1
    Junior Member
    Join Date
    Apr 2019
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default I dont know what to do with this code

    public class Arraytest {


    public static void main(String[] args) {
    // TODO Auto-generated method stub

    String[] pokemon = {"Pikachu", "Snorlax", "Mewtwo", "Charmander", "Eevee", "Ditto", "Squirtle", "Bulbasaur", "Jigglypuff", "Gengar"};
    String[] superPower = {"Electric Zap", "Sleep Spell", "Tail Whip", "Fire blast", "Sonic Pounce", "Gelly Bomb", "Water Canon",
    "Flower Blast", "Jiggly Song", "Ghost Attack"};

    }

    public static void description(String[] pokemon, String[] superPower){
    for(int i = 0; i < pokemon.length; i++){
    System.out.println("Pokemon: " + pokemon[i] + " | Power: " + superPower[i]);
    }

    }

    }

    --- Update ---

    Can somebody help me on this code please?

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    22,407
    Thanks
    53
    Thanked 2,399 Times in 2,352 Posts

    Default Re: I dont know what to do with this code

    What problems are you having with the code? Please explain.
    Copy the full text of any error messages and paste it here.

    Please edit your post and wrap your code with code tags:

    [code]
    **YOUR CODE GOES HERE**
    [/code]

    to get highlighting and preserve formatting.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. [SOLVED] I dont know how to complete this code?
    By jwb4291 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: November 8th, 2017, 11:11 PM
  2. I dont understand this code ?
    By ammehmeti in forum What's Wrong With My Code?
    Replies: 12
    Last Post: June 22nd, 2014, 07:57 AM
  3. Replies: 4
    Last Post: July 25th, 2011, 06:12 PM
  4. WHY this code dont work?
    By sibbe in forum Java Theory & Questions
    Replies: 7
    Last Post: December 9th, 2010, 10:47 AM