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 3 of 3

Thread: Trying hard(im just a beginne)

  1. #1
    Junior Member
    Join Date
    Feb 2013
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Trying hard(im just a beginne)

    Can i put an array to my method?

    For example:

    public String[] Load(double id){
    }
    is this code valid? Does it return a string array value?

  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,534
    My Mood
    Hungover
    Thanks
    145
    Thanked 647 Times in 552 Posts

    Default Re: Trying hard(im just a beginne)

    Quote Originally Posted by riddick_charel View Post
    Can i put an array to my method?

    For example:

    public String[] Load(double id){
    }
    is this code valid? Does it return a string array value?
    What happened when you compiled it? What happened when you made an example program to test it?
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    21,916
    Thanks
    55
    Thanked 2,351 Times in 2,322 Posts

    Default Re: Trying hard(im just a beginne)

    is this code valid?
    Does the code compile OK? The compiler will tell you if there are syntax problems with the code.
    If it compiles, try testing it by calling the method and printing out what is returned.
    You can use this method to print out the contents of an array:
    System.out.println("an ID "+ java.util.Arrays.toString(theArrayName));
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. java programming its so hard i need help please.
    By javaishard in forum What's Wrong With My Code?
    Replies: 2
    Last Post: December 16th, 2012, 11:54 PM
  2. Hard time with Strings
    By Aboyordie in forum What's Wrong With My Code?
    Replies: 7
    Last Post: October 4th, 2012, 11:58 PM
  3. Re: How hard would this be to write for a Beginner?
    By ronaldreinne in forum Java Theory & Questions
    Replies: 2
    Last Post: August 15th, 2012, 12:33 AM
  4. How hard would this be to write for a Beginner?
    By Bgriesh in forum Java Theory & Questions
    Replies: 7
    Last Post: August 11th, 2012, 02:30 AM
  5. I am having a hard time with my code
    By SandeeBee in forum What's Wrong With My Code?
    Replies: 14
    Last Post: November 12th, 2011, 09:34 AM