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: usage of arrays

  1. #1
    Junior Member
    Join Date
    Nov 2012
    Posts
    5
    My Mood
    Happy
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question usage of arrays

    Hi friends
    hw to call an array which is being declare in a class, say car ,from the testerclass which hold a main method.. Do we use it by the normal style as object reference that is used for calling and assigning instant variables or is it in a different way?

    Thanks n advance
    passionlrnr


  2. #2
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,676
    Thanks
    25
    Thanked 329 Times in 305 Posts

    Default Re: usage of arrays

    You should be able to get it with an object reference (provided the array is visible to the tester class), or by using a getter method that returns the array.
    NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/

Similar Threads

  1. wmi usage or PC info in java
    By roofninja in forum What's Wrong With My Code?
    Replies: 9
    Last Post: September 12th, 2012, 09:08 AM
  2. The problem with Java and CPU usage, need HELP
    By Bahramudin in forum Member Introductions
    Replies: 1
    Last Post: July 25th, 2012, 09:23 AM
  3. Insertion Sort - memory usage
    By lovon in forum Algorithms & Recursion
    Replies: 2
    Last Post: November 6th, 2011, 04:00 PM
  4. HashMap : Simple Usage and Understanding
    By weakprogrammer in forum Collections and Generics
    Replies: 1
    Last Post: June 25th, 2011, 03:37 PM
  5. HashMap usage in Java
    By neo_2010 in forum Collections and Generics
    Replies: 2
    Last Post: September 18th, 2009, 02:12 AM