Help with method/array lab

I need some help creating an array of students in my lab, using a method. I'm fairly confused on how to do this. This is a sample of my code, i've deleted a lot of the stuff further down thats not needed atm.
Anyhow, I understand how arrays work and whatnot, but have no clue as to how to create the array in the method. Any help please! (The last few lines of posted code is where the array should go)
import java.util.Scanner;
import java.io.*;
public class Lab6
    public static void main(String[] args)
        // Fill in the body according to the following comments
         Scanner keyboard = new Scanner(System.in);
         // Input file name
     String fileName = getFileName(keyboard);
         // Input number of students
     int numberOfStudents = FileIOHelper.getNumberOfStudents(fileName);
         // Input all student records and create Student array and
     Student [] studentAry = new Student [numberOfStudents];
         // integer array for total scores
    // Given a Scanner in, this method prompts the user to enter
    // a file name, inputs it, and returns it.
    private static String getFileName(Scanner keyboard)
         String fileName;
     System.out.print("Enter input file name: ");
    fileName = keyboard.nextLine();
    return fileName;
    // Given the number of students records n to input, this
    // method creates an array of Student of the appropriate size,
    // reads n student records using the FileIOHelper, and stores
    // them in the array, and finally returns the Student array.
    private static Student[] getStudents(int n)
        // Fill in the body
    }

Oh btw, this is sample code givin to me by my professor that may help?
        // Copy a student from the file to the array
          Student aStudent = FileIOHelper.getNextStudent();
          studentAry[0] = aStudent;
          // Copy another student to the array
          aStudent = FileIOHelper.getNextStudent();
          studentAry[1] = aStudent;
          // Get student information from the array
          String name = studentAry[1].getName();
          int s1 = studentAry[1].getScore(1);
          int s2 = studentAry[1].getScore(2);
          int s3 = studentAry[1].getScore(3);

Similar Messages

  • Need help with method calling

    I have a problem with method calling as it does the method but doesn't send the values to the main program. The Need section in the main should take in the Max and Allocation arrays from the setMax and setAllocation but it doesn't. I figure I'm missing a return call or something. Could you help me out.
        public class Project4
           public static void main (String[] args)
             int[] Available=new int[4];
             int[][]Max=new int[5][4];
             int[][]Allocation=new int[5][4];
             int[][] Need=new int[5][4];
             setMax();
             setAllocated();
             setAvailable();
           //Creates the need.
             int numMax, numAlloc, numNeed;
             for(int row=0; row<5; row++)
                for (int col=0; col<4; col++)
                   numMax=Max[row][col];
                   numAlloc=Allocation[row][col];
                   numNeed=numMax-numAlloc;
                   Need[row][col]=numNeed;
             for(int row=0; row<Need.length; row++)
                for (int col=0; col<Need[row].length; col++)
                   System.out.print (Need[row][col]);
                System.out.println();
             System.out.println();
            //From here on checks to see if available.     
             int[] processLeft=new int[5];
             int numChecker, numAvail, counter, check, num, stop, processCounter;
             int i=0; 
             num=0;
             stop=3;
             processCounter=0;
             for(int row=num; row<Need.length; row++)
                int col=0;
                counter=Need[row].length; 
                numChecker=Need[row][col];
                numAvail=Available[col];
                do
                   check=0;
                   numChecker= Need[row][col];
                   numAvail=Available[col];
                   col++;
                   if (numChecker<=numAvail)
                      check=1;
                   while(numChecker<=numAvail && col<counter);
                if(col==counter && check==1)
                   System.out.println("Process P"+row+" executes");
                   for(col=0; col<Allocation.length-1; col++)
                      numChecker=Allocation[row][col];
                      numAvail=Available[col];
                      numAvail=numChecker+numAvail;
                      Available[col]=numAvail;
                   num++; 
                   processCounter=processCounter+1;
                else
                   processLeft=row;
    i++;
    // Checks the processes left over
    int j=0;
    int row=0;
    int col=0;
    counter=Need[row].length;
    while(processLeft[j]!=5 && processCounter!=5)
    row=processLeft[j];
    do
    check=0;
    numChecker= Need[row][col];
    numAvail=Available[col];
    col++;
    if (numChecker<=numAvail)
    check=1;
    while(numChecker<=numAvail && col<counter);
    if(col==counter && check==1)
    System.out.println("Process P"+row+" executes");
    for(col=0; col<Allocation.length-1; col++)
    numChecker=Allocation[row][col];
    numAvail=Available[col];
    numAvail=numChecker+numAvail;
    Available[col]=numAvail;
    processCounter=processCounter+1;
    j++;
    safe(processCounter);
    public static void setAllocated()
         // Creates the Allocation
    int[][] Allocation= {{3,0,0,2},{1,0,0,0},{1,3,5,4},{0,6,3,2},{0,0,1,4}};
    for(int row=0; row<Allocation.length; row++)
    for (int col=0; col<Allocation[row].length; col++)
    System.out.print (Allocation[row][col]);
    System.out.println();
    System.out.println();
    public static void setMax()
         // Creates the max
    int[][] Max= {{3,0,1,2},{1,5,5,0},{2,3,5,6},{0,6,5,2},{0,6,5,6}};
    for(int row=0; row<Max.length; row++)
    for (int col=0; col<Max[row].length; col++)
    System.out.print (Max[row][col]);
    System.out.println();
    System.out.println();
    public static void setAvailable()
    // Creates the Available.
    int[] Available={3,5,2,0};
    public static void safe(int processCounter)
         // Prints if it is safe or not     
    if(processCounter!=5)
    System.out.println("\n The system is not safe");     
    else
    System.out.println("\n The system is safe");

    those methods declare and initialize variables that exist only within that specific method, so no other method can see them
    move the 4 arrays you declare in main() out of the method into the class body, then in the other methods, don't declare new arrays, simply initialize the ones you just moved into the class body
    or alternatively, you could make the methods return the arrays they create, and instead of your main method creating arrays, it simply works with whatever those methods return
    btw 20 minutes is a bit early to be getting impatient

  • HELP WITH CHAR ARRAY

    Here is the go folks this is a pice of code which I was helped with by a member of this forum, THANX HEAPS DUDE. What has happened now is the criteria is changed, previously it would search for a string in the vector. But now I have to have searches with wildcards, so it needs to utilize a char array methinks. So it will go through change the parameter to a char array, then go through the getDirector() method to return a director string, then it needs to loop through the char array and check if the letters are the same. then exit on the wild card. Now all this needs to be happening while this contruct down the bottom is looping through all the different elements in the moviesVector :s if anyone could give me a hand it is verry welcome. I must say also that this forum is very well run. 5 stars
    public void searchMovies(java.lang.String searchTerm) {
    Iterator i = moviesVector.iterator();
    while (i.hasNext()) {
    Movie thisMovie = (Movie)i.next();
    //Now do what you want with thisMovie. for instanse:
    if (thisMovie.getDirector().equals(searchTerm))
    foundMovies.add(thisMovie);
    //assumes foundMovies is some collection that we will
    //return later... or if you just want one movie, you can:
    //return thisMovie; right here.
    }

    Sorry, I clicked submit, but i didnt enable to wtch it, so i stoped it before it had sent fully. Evidently that didnt work.

  • Help with parallel arrays of different data types

    Hello all, I am having an issue with parallel arrays. My program requires me to read information from a text file into 4 parallel arrays (2 String and 2 double). My text file needs to look something like this:
    John Johnson
    0000004738294961
    502.67
    1000.000
    Jane Smith
    0000005296847913
    284.51
    1000.000
    ...and so on
    Where the first thing is the name (obviously), an account number, the balance in the account, and the credit limit. I just cant figure out how to read everything into the arrays. We havent learned anything too heavy, and this seems a little too advanced for my class, but I guess we will manage. Any help will be appreciated. Thanks guys.
    Casey

    Man this is a dumb homework assignment. The requirements scream out for a class along the lines of
    public class Account{
      private String name, number;
      private double balance,creditlimit;
       // more code here
    }and then to use a List of Account objects.
    Anyway what's your actual problem. There's nothing very hard about it. A loop. So....
    You should consider posting (formatted) code showing what you have done and where exactly you are stuck.

  • I need help with 2 arrays

    I need help with this portion of my program, it's supposed to loop through the array and pull out the highest inputted score, currently it's only outputting what is in studentScoreTF[0].      
    private class HighScoreButtonHandler implements ActionListener
               public void actionPerformed(ActionEvent e)
              double highScore = 0;
              int endScore = 0;
              double finalScore = 0;
              String tempHigh;
              String tempScore;
              for(int score = 0; score < studentScoreTF.length; score++)
              tempHigh = studentScoreTF[score].getText();
                    tempScore = studentScoreTF[endScore].getText();
              if(tempHigh.length() <  tempScore.length())
                   highScore++;
                   finalScore = Double.parseDouble(tempScore);
             JOptionPane.showMessageDialog(null, "Highest Class Score is: " + finalScore);This is another part of the program, it's supposed to loop through the student names array and pull out the the names of the students with the highest score, again it's only outputting what's in studentName[0].
         private class StudentsButtonHandler implements ActionListener
               public void actionPerformed(ActionEvent e)
              int a = 0;
              int b = 0;
              int c = 0;
              double fini = 0;
              String name;
              String score;
              String finale;
              String finalName = new String();
              name = studentNameTF[a].getText();
              score = studentScoreTF.getText();
              finale = studentScoreTF[c].getText();
              if(score.length() < finale.length())
                   fini++;     
                   name = finalName + finale;
         JOptionPane.showMessageDialog(null, "Student(s) with the highest score: " + name);
                   } Any help would be appreciated, this is getting frustrating and I'm starting to get a headache from it, lol.
    Edited by: SammyP on Oct 29, 2009 4:18 PM
    Edited by: SammyP on Oct 29, 2009 4:19 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Heres a working example:
    class Compare {
        public int getHighest(int[] set) {
            int high = set[0];
            for(int i = 0; i < set.length; i++) {
                if(set[i] > high) {
                    high = set;
    return high;

  • Need help with an array function

    I'm using the array index function and i would like to be able to control what elements go out on it.  For example, if i wanted only the first element to go out, i don't want the second element to send out zero.  Is there any way i can control what elements leave the array index function.  I also don't understand what the index inputs do on that function either.  If anyone has any advice on the application or can modify it in any way, please help.
    Attachments:
    Array and for loop.vi ‏1190 KB

    The index inputs determine what elements are retrieved. For example of you would wire a 10 and a 20 to your two index inputs, you would bet element #10 and element #20 of your array. You can resize it to get any desired number of elements.
    If you don't wire the index inputs, you'll get the first two elements.
    If you only wire the top index input (e.g a 10), you'll get element #10 and #11.
    LabVIEW Champion . Do more with less code and in less time .

  • Hello guys need help with reverse array

    Need help reversing an array, i think my code is correct but it still does not work, so im thinking it might be something else i do not see.
    so far the input for the array is
    6, 25 , 10 , 5
    and output is still the same
    6 , 25 , 10 , 5
    not sure what is going on.
    public class Purse
        // max possible # of coins in a purse
        private static final int MAX = 10;
        private int contents[];
        private int count;      // count # of coins stored in contents[]
         * Constructor for objects of class Purse
        public Purse()
           contents = new int[MAX];
           count = 0;
         * Adds a coin to the end of a purse
         * @param  coinType     type of coin to add
        public void addCoin(int coinType)
            contents[count] = coinType;
            count = count + 1;
         * Generates a String that holds the contents of a purse
         * @return     the contents of the purse, nicely formatted
        public String toString()
            if (count == 0)
                return "()";
            StringBuffer s = new StringBuffer("(");
            int i = 0;
            for (i = 0; i < count - 1; ++i)
                s.append(contents[i] + ", "); // values neatly separated by commas
            s.append(contents[i] + ")");
            return s.toString();
         * Calculates the value of a purse
         * @return     value of the purse in cents
        public int value()
            int sum = 0; // starts sum at zero
            for( int e : contents) // sets all to e
                sum = sum + e; //finds sum of array
            return sum; //retur
         * Reverses the order of coins in a purse and returns it
        public void reverse()
           int countA = 0;
           int x = 0;
           int y = countA - 1;                                          // 5 - 1 = 4
           for (int i = contents.length - 1; i >=0 ; i--)                        // 4, 3 , 2, 1, 0
                countA++;                                             // count = 5
            while ( x < y)
                int temp = contents[x];
                contents[x] = contents [y];
                contents [y] = temp;
                y = y- 1;                                         // 4 , 3 , 2, 1 , 0
                x = x + 1 ;                                             // 0 , 1,  2  , 3 , 4
    }

    ok so i went ahead and followed what you said
    public void reverse()
          int a = 0;
          int b = contents.length - 1;
          while (b > a)
              int temp = contents[a];
              contents[a] = contents;
    contents [b] = temp;
    a++;
    b--;
    }and its outputting { 0, 0, 0, 0}
    im thinking this is because the main array is has 10 elements with only 4 in use so this is a partial array.
    Example
    the array is { 6, 25, 10, 5, 0, 0, 0, 0, 0, 0,}
    after the swap
    {0, 0 , 0 , 0, 0 , 0 , 5 , 10 , 25, 6}
    i need it to be just
    { 5, 10, 25, 6}
    so it is swapping the begining and end but only with zeroes the thing is i need to reverse the array without the zeroes                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Help with PHP array code

    Not sure what's going on here, but hopefully someone can spot where I'm going wrong.
    Its especially weird, as I'm using the same code, with the same database table names etc but on a different site.
    Basically, I've set up a database table to store customer feedback on products.
    Its all working fine on this site :
    http://www.mye-reader.co.uk/customerreviews.php
    But on the site I'm working on, its only showing the first record. There are only a couple of records at the moment, but I've tried changing the query from ASC to DESC, and it swaps the one it shows, so it looks like the issue is with the array. Even though its the same code.
    http://www.mybabymonitors.co.uk/reviews.php
    Anyway, my query looks like :
    mysql_select_db($database_connPixelar, $connPixelar);
    $query_rsReviews = "SELECT * FROM feedback WHERE Approved = 'Yes' ORDER BY Product DESC";
    $rsReviews = mysql_query($query_rsReviews, $connPixelar) or die(mysql_error());
    $row_rsReviews = mysql_fetch_assoc($rsReviews);
    $totalRows_rsReviews = mysql_num_rows($rsReviews);
    And the array code looks like :
    <table cellpadding="0" cellspacing="0" width="100%" border="0">
           <?php
         $groups = array();
    while ($row = mysql_fetch_assoc($rsReviews)) {
        $groups[$row['Product']][] = $row;
    foreach ($groups as $product_name => $rows) {
        echo "<tr><td class=\"product\">$product_name</td></tr>";
        foreach ($rows as $row) {
            echo "<tr><td class=\"review\">".$row['Review']."</td></tr>";
            echo "<tr><td class=\"name\">".$row['CustomerName']."</td></tr>";
            echo "<tr><td class=\"date\">".$row['Date']."</td></tr>";
    ?>
    </table>
    Any ideas what's going on here?

    Its OK - I figured it out - it was the
    $row_rsReviews = mysql_fetch_assoc($rsReviews);
    line in the query.
    Turns out it wasn't that one was working, and the other not - they were both starting from the second record.

  • Need help with adding arrays to invoice.java please willing to pay?

    Using your Invoice class created in lab02, write a client program that allows the user to input three Invoice objects into an array of Invoice objects. After you have inputted all of the invoices, print a heading and then output all of the array elements (Invoice objects) by calling the method from your Invoice class that displays all of the data members on a single line using uniform field widths to insure that all Invoice objects will line up in column format (created in Lab04). At the end of the loop, display the calculated total retail value of all products entered in the proper currency format.
    Example of possible program execution:
    Part Number : WIDGET
    Part Description : A fictitious product
    Quantity : 100
    Price          : 19.95
    (etc.)
    Example of possible output
    Part Number          Part Description          Quantity          Price     Amount
    WIDGET          A fictitious product     100          19.95     199.95
    Hammer               9 pounds          10          5.00     50.00
    (etc.)
    Total Retail Value:                                   249.95
    This is what i have so far Invoice Test
    //Lab 2 InvoiceTest.java
    //Application to test class Invoice.
    //By Morris Folkes
    public class InvoiceTest
    public static void main( String args[] )
    Invoice invoice1 = new Invoice( "1234", "Hammer", 2, 14.95 );
    // display invoice1
    System.out.println( "Original invoice information" );
    System.out.printf( "Part number: %s\n", invoice1.getPartNumber() );
    System.out.printf( "Description: %s\n",
    invoice1.getPartDescription() );
    System.out.printf( "Quantity: %d\n", invoice1.getQuantity() );
    System.out.printf( "Price: %.2f\n", invoice1.getPricePerItem() );
    System.out.printf( "Invoice amount: %.2f\n",
    invoice1.getInvoiceAmount() );
    // change invoice1's data
    invoice1.setPartNumber( "001234" );
    invoice1.setPartDescription( "Blue Hammer" );
    invoice1.setQuantity( 3 );
    invoice1.setPricePerItem( 19.49 );
    // display invoice1 with new data
    System.out.println( "\nUpdated invoice information" );
    System.out.printf( "Part number: %s\n", invoice1.getPartNumber() );
    System.out.printf( "Description: %s\n",
    invoice1.getPartDescription() );
    System.out.printf( "Quantity: %d\n", invoice1.getQuantity() );
    System.out.printf( "Price: %.2f\n", invoice1.getPricePerItem() );
    System.out.printf( "Invoice amount: %.2f\n",
    invoice1.getInvoiceAmount() );
    Invoice invoice2 = new Invoice( "5678", "PaintBrush", -5, -9.99 );
    // display invoice2
    System.out.println( "\nOriginal invoice information" );
    System.out.printf( "Part number: %s\n", invoice2.getPartNumber() );
    System.out.printf( "Description: %s\n",
    invoice2.getPartDescription() );
    System.out.printf( "Quantity: %d\n", invoice2.getQuantity() );
    System.out.printf( "Price: %.2f\n", invoice2.getPricePerItem() );
    System.out.printf( "Invoice amount: %.2f\n",
    invoice2.getInvoiceAmount() );
    // change invoice2's data
    invoice2.setQuantity( 3 );
    invoice2.setPricePerItem( 9.49 );
    // display invoice2 with new data
    System.out.println( "\nUpdated invoice information" );
    System.out.printf( "Part number: %s\n", invoice2.getPartNumber() );
    System.out.printf( "Description: %s\n",
    invoice2.getPartDescription() );
    System.out.printf( "Quantity: %d\n", invoice2.getQuantity() );
    System.out.printf( "Price: %.2f\n", invoice2.getPricePerItem() );
    System.out.printf( "Invoice amount: %.2f\n",
    invoice2.getInvoiceAmount() );
    } // end main
    } // end class InvoiceTest

    i suck in java There are 2 possible reasons for this:
    1. you haven't studied
    2. you aren't cut out for programming
    and there r hardly any tutors at my school. plus i work 2 jobs day n night. Please, I'm only want help thats allYou have the help of the ENTIRE WORLD COMMUNITY right here, right now. But you're not willing to make any effort whatsoever. You think people will help or even respect you? You may fail your class and you may fail in life!
    Cheaters don't win and winners don't cheat!

  • Need help with an array

    I'm working on creating an array that is basically a deck of cards, this is the problem.
    I'm getting this error:
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 4
      void main()
        final int ARRAY_SIZE = 52;
        String[] deck = new String[ARRAY_SIZE];
        String[] cardValue = new String[]{"A","2","3","4","5","6","7","8","9","T","J","Q","K"};
        String[] cardSuit = new String[]{"C","H","D","S"};
        for (int count = 0; count < ARRAY_SIZE; count++)
          deck[count]= cardValue[count] + cardSuit[count];
        }I Know that this is because cardSuit is reaching the end of the array, but how do I keep this from happening and make it start from the beginning until i reach the end of the cardValue array?

    By the way thanks for the help guys, I'm in a pinch for this assignment and I appreciate all of the help.
      void main()
        final int ARRAY_SIZE = 52;
        String[] deck = new String[ARRAY_SIZE];
        String[] cardValue = new String[]{"A","2","3","4","5","6","7","8","9","T","J","Q","K"};
        String[] cardSuit = new String[]{"C","H","D","S"};
        for (int count = 0; count < ARRAY_SIZE; count++)
          deck[count]= cardValue[count % 13] + cardSuit[count % 4];
          showCards(deck);
      void showCards(String [] list)
        String cards = ("card");
        for (int count = 0; count < list.length; count++)
          print (cards);
      This is what I'm talking about. I need to be able to call the showCards method and have it display whatever cards are currently in the players hand regardless of how many cards there are. I believe that I'm right when I used the void declaration because I don't want it the method to return anything to itself.
    Right now with the code as is, i get "card" typed out 52 times.
    First how do I go about having it print out the complete deck and the order that they are in?
    Is there a way to create the deck in pre-sorted like I have below?
    This was the assignment:
    Write a ConsoleProgram to create a deck of playing cards, shuffle them, and deal out 5 cards to the player. To do this:
    � You will need an array of 52 cards. In the basic version of this program, each card is a string in the form �XY�, where X is the rank (A, 2, 3, 4, 5, 6, 7, 8, 9, T, J, Q, K, A) and Y is a letter designating the suite (C, H, D, S).
    � You will need to shuffle the cards by swapping the positions of two randomly selected cards in the array. For this, you should write and use three methods:
    o randRange � a method which takes 2 parameters: a minimum integer and a maximum integer. It creates a random integer in this range and returns it.
    o swap � a method which takes 3 parameters: an array of cards and two subscripts. It swaps the array elements with the given subscripts and returns nothing in its name.
    o shuffle � a method which takes 2 parameters: an array of cards and a number of times to swap cards. It shuffles by swapping two randomly selected cards the desired number of times (a possibly different pair each time). It returns nothing in its name (so it is a void method).
    � You will need an array of 5 cards for the player�s hand. After shuffling the deck, you will fill this array with the first 5 cards from the deck.
    � Display the unshuffled deck, then the shuffled deck, and finally the player�s hand. Indicate which is which in the output. For example, the output of one program run might look like this: Unshuffled: 2C, 3C, 4C, 5C, 6C, 7C, 8C, 9C, TC, JC, QC, KC, AC, 2D, 3D, 4D, 5D, 6D, 7D, 8D, 9D, TD, JD, QD, KD, AD, 2H, 3H, 4H, 5H, 6H, 7H, 8H, 9H, TH, JH, QH, KH, AH, 2S, 3S, 4S, 5S, 6S, 7S, 8S, 9S, TS, JS, QS, KS, AS Shuffled: 2C, QC, 3S, 9C, 9S, 6C, 6H, 3C, QH, 2H, 8C, 9H, AH, 4S, AS, TH, 6D, 3D, 2S, 8S, 5C, TC, 4C, 4D, 7C, AD, 9D, JD, 4H, 5S, KH, 7H, JS, 8D, TD, KC, 3H, 2D, KD, AC, KS, JC, 5H, JH, 8H, 5D, 7S, TS, QD, 7D, 6S, QS Your Hand: 2C, QC, 3S, 9C, 9S

  • Need some help with method for calendar

    Hi all,
    I've got to design a claendar for college but I'm not allowed use any one the Java calendar classes so I've but up a number of methods to get the start days of months etc.
    At the moment I'm trying to get a method working tha will loop around 12 times and assign the days in the month to a string array for printing later in another function but to test I'm printing to screen.
    At the moment when I get the days to print on screen It shows me the days for Janurary similar to below 12 times and I've been looking at it so long I can't see the wood for the trees and I was just wondering if someone can point out when I'm going wrong here.
    1 2 3 4 5 6
    7 8 9 10 11 12 13
    14 15 16 17 18 19 20
    21 22 23 24 25 26 27
    28 29 30 31
    The data for the start days and total number of days in a month are held in arrays in seperate methods as well.
    With the following code I'm just getting the days for Jan to print out 12 times.
    I thnik the the problem is with the first part of the while loop It does not appear to be looping throught the DaysIn and TopLeft arrays as if I manually change the value of the variable l = 1; I get the days for Feb to print out.
               static int [] DaysIn (int y) //  return correct day in month
             int [] LDays = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; // leap year.
             int [] Days = {31, 28, 31, 30, 31, 31, 31, 30, 30, 31, 30, 31};
         if (y%4==0 && (y%100!=0 || y%400==0)) // test if y is a leap year. y is gotten from print cal.
             return LDays;
         else               
            return Days;
    static int [] TopLeft (int y) // find the starting position of the days in a month for printing
            int [] k = StartDay(y);
            int [] TopLeft = new int [12];
            int t = 0;
           while (t!=12)
         TopLeft[t] = 1- k[t];
         t++;
           return TopLeft;
    static String [] DispMonthDays(int y) // Method to supply the days of a month in grid form needs work.
         int k = 0; // int to take the topleft value for each month
         int DIM = 0; // int to take the total days in each month
        String MonthD=""; // empty string
         String [] MonthDay = new String [6];
         int l= 0;
                   While(l!=12)
              k = TopLeft(y)[l]; // Believe problem lies at these two lines
              DIM = DaysIn(y)[l];  //
                while (k != 42)
                 if (k < 1){MonthD = MonthD + " "+" "+" ";}
                                      else if (k >=1 && k <=9){MonthD = MonthD + " "+ k +" ";}
                    else if (k >= 10 && k <= DIM){MonthD = MonthD + k + " ";}
                    else if(k > DIM){MonthD = MonthD +" ";}
                    k++;     
              MonthDay[0] = MonthD.substring(0,20);
              MonthDay[1] = MonthD.substring(21,41);
              MonthDay[2] = MonthD.substring(42,62);
              MonthDay[3] = MonthD.substring(63,83);
              MonthDay[4] = MonthD.substring(84,104);
              MonthDay[5] = MonthD.substring(105,106);
         l++;}
         return MonthDay;
    static void PrintCal(int y) // function to hand off year and print cal
         int upstep=0;
        int count=0;
        while (count !=12)
              while (upstep!=6)
                 System.out.print(DispMonthDays(y)[upstep]);System.out.println();
                   upstep++;
              upstep=0;
              count++;
    }Any help greatly appreciated

    Given the previous valid comment here is my code again.
    I'm running the code on the console
       // Months of year          
                    static final String [] MNames  = {"January ", "February ", "March ", 
                        "April ",   "May ",      "June ",
                        "July ",    "August ",   "September ",
                         "October ", "November ", "December "};
         static int [] daysIn (int y) // see if y is a leap year and return correct day in month
               int [] LDays = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; // leap year.
               int [] Days = {31, 28, 31, 30, 31, 31, 31, 30, 30, 31, 30, 31};
              if (y%4==0 && (y%100!=0 || y%400==0)) // test if y is a leap year. y is gotten from printCal.
              return LDays;
              else               
              return Days;
                    static int [] startDay(int y) // Find First Day of a month
              int [] z = daysIn(y);
              int firstDay =((y-1900)*365 +(y-1901)/4)%7;
              int x = 0;
             int [] startDay = new int [12];
             while (x!=12)
              if (x==0)
                 {startDay[0] = firstDay; firstDay = (firstDay+z[0])%7;}
              else
                 {startDay[x] = firstDay; firstDay = (firstDay+z[x])%7;}
              x++;
              return startDay;
           static int [] topLeft (int y) // find the starting position of the days in a month for printing
              int [] k = startDay(y);
              int [] topLeft = new int [12];
              int t = 0;
                                         while (t!=12)
                       topLeft[t] = 1- k[t];
                                              t++;
              return topLeft;
           static String [] dispMonthDays(int y) // Method to supply the days of a month in grid form needs work.
                 int k = 0; // int to take the topleft value for each month
                 int dim = 0; // int to take the total days in each month               
                            String monthD=""; // empty string
                 String [] monthDay = new String [6]; // String Array to take the results of MonthD  and be returned 12 tmes
              int loopThrough= 0; // int variable to progress through the topLeft and daysIn arrays
              while(loopThrough !=12)
                     k = topLeft(y)[loopThrought]; // Not being moved through as far as I can see
                    dim = daysIn(y)[loopThrough];
                          while (k != 42)
                     if (k < 1){monthD = monthD + " "+" "+" ";}
                        else if (k >=1 && k <=9){monthD = monthD + " "+ k +" ";}
                       else if (k >= 10 && k <= dim){monthD = monthD + k + " ";}
                       else if(k > dim){monthD = monthD +" ";}
                       k++;}
                     monthDay[0] = monthD.substring(0,20);
                     monthDay[1] = monthD.substring(21,41);
                     monthDay[2] = monthD.substring(42,62);
                     monthDay[3] = monthD.substring(63,83);
                     monthDay[4] = monthD.substring(84,104);
                     monthDay[5] = monthD.substring(105,106);
                   l++;
              return monthDay;
       static void printCal(int y) // function to hand off year and print cal amended for testing to see if dispMonthDays is working
         int count=0;
         int upstep=0; // int variable to return the monthDay
                          while (count !=12)
              while (upstep!=6)
                      System.out.print(dispMonthDays(y)[upstep]);
                       upstep++;
               upstep=0;
              count++;
      public static void main (String [] args)
         Scanner input = new Scanner (System.in);
         System.out.print("Enter a year: "); int year = input.nextInt();
             printCal(year);
                  I still think the problem is with the first loop in dispMonthDays

  • Please I need help with methods!

    Could anyone please help me with this problem?
    I know that objects are passed to methods by reference, including arrays also. Then I'm writing methods where I assign other values to argument objects.
    However, when I call these methods from main() with null arguments, they still remain null (verified 100% in debugging)! How could this happen? Is it probably because I'm assigning the object values inside try blocks in the methods?

    Could anyone please help me with this problem?
    I know that objects are passed to methods by
    reference, including arrays also. Then I'm
    writing methods where I assign other values to
    argument objects.
    sigh
    Objects are not passed by reference.
    Object references are passed by value into methods.
    Arrays are objects, so they're passed like all other objects.
    Then I'm
    writing methods where I assign other values to
    argument objects.Since the reference is passed by value, you can't change it. You can change the state of the object that it points to, however, as long as it's not final or immutable.
    However, when I call these methods from main() with
    null arguments, they still remain null
    (verified 100% in debugging)! How could this happen?
    Is it probably because I'm assigning the object
    values inside try blocks in the methods?Remember, of course, that declaring an array of objects means that all the references it points to are null. You have to set each one individually.
    Better go back and re-read some fundamental stuff.
    %

  • Help with an array program

    I can't see how to calculate the lowest hours, highest hours, and average hours worked.
    These three values should be outputted each on a seperate line.
    I just can't figure this out.
    Any help please.
    This program will show the employees
    hours. It will have one
    class.It will use an array to keep
    track of the number of hours the employee
    has worked with the output to the monitor
    of the employees highest, lowest, and the
    average of all hours entered. */
    import java.util.*;
    import java.text.DecimalFormat;
    /*** Import Decimal Formating hours to format hours average. ***/
    public class cs219Arrays
         public static void main(String[] args)
              Scanner scannerObject = new Scanner(System.in);
              int[] employees ={20, 35, 40};
              int employeesHighest = 40;
              int employeesLowest = 20;
              double employeesAverage = 35;
              int[] firstEmployee = new int[1];
              int[] secondEmployee = new int[2];
              int[] thirdEmployee = new int[3];
              System.out.println("This program will accept hours worked for 3 employees.");
              System.out.println("Enter hours worked for employee #: ");
              System.out.println(".\n");
              employeesAverage = scannerObject.nextInt();
              for(int count =20; count <= 40; count++)
                             DecimalFormat df = new DecimalFormat("0.00");
                             System.out.println("pay: " employeesAverage " lowest " employeesHighest " Highest hours " employeesLowest " Lowest hours "+df.format(employeesAverage));
                             System.out.print("\n");
                             employeesAverage++;
    }/* end of body of first for loop */
              for(int count =20; count <= 40; count++)
                                       employeesAverage = employeesAverage + employeesHighest + employeesLowest;
                                       DecimalFormat df = new DecimalFormat("0.00");
                                       System.out.println("pay: $" employeesAverage " lowest " employeesHighest " Highest hours $" +df.format(employeesAverage));
                                       System.out.print("\n");
                                       employeesAverage++;
    }/* end of body of second for loop */
              for(int count =20; count <= 40; count++)
                                       employeesAverage = employeesAverage + employeesHighest + employeesLowest;
                                       DecimalFormat df = new DecimalFormat("0.00");
                                       System.out.println("pay: $" employeesAverage " lowest " employeesHighest " Highest hours $" +df.format(employeesAverage));
                                       System.out.print("\n");
                                       employeesAverage++;
    }/* end of body of third for loop */
              System.out.println("\n");
              DecimalFormat twoDigits = new DecimalFormat("0.00");
              /*** Create new DecimalFormat object named twoDigits ***/
              /*Displays number of hours, employees hours and average hours.*/
              System.out.println("You entered " + employeesAverage + " number of hours.");
              System.out.println("Your number of hours are " + twoDigits.format(employeesAverage));
              System.out.println("\n\n");
    }     /*End of method for data.*/
    {     /*Main method.*/
    }     /*End of main method.*/
    }     /*End of class cs219Arrays.*/

    Want help?
    Use the code formatting tags for starters. http://forum.java.sun.com/help.jspa?sec=formatting

  • Help with my array problem.

    Here I have 3 class. One main class, a class to add passengers and a class to display the seating chart.
    A blank seat represented by a "-" is turned into "x". When that is done it goes back to the main class to ask the user if if another passenger wants to be added, display seating chart or quit.
    The problem I have is if the user wants to add passengers after the first time then the array is set back to all blanks "-". I need help how on how to use the changed array after the first time so I can build onto existing seats that are already full, but initially the array has to be filled with "-". Also this changed array needs to be sent to the SeatingChart class to display the changed seating chart if the user selects that.
    I tried some stuff with tempArray[] but can't figure it out. Any help would be appreciated, thanks.
    Main class
    import java.util.*;
    public class Airline {
      public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);
        int mainOption = 0, passengers = 0;
        String seatingClass;
        Reservation reserveSeat;
        SeatingChart displaySeat = new SeatingChart();
        while (mainOption != 3){
          mainOption = 0;
          // Menu loop
          while (mainOption < 1 || mainOption > 3) {
            System.out.println("Welcome to the Airline. Please choose an option.\n");
            System.out.println(
                "Press 1 to add passengers. \nPress 2 to display the " +
                "seating chart. \nPress 3 to Quit.");
            mainOption = scan.nextInt();
        // if statement when 1 is chosen to add passengers
        if (mainOption == 1) {
          Scanner input = new Scanner(System.in);
          // User chooses first or economy class
          do {
            System.out.println("Type E for economy or F for first class:");
            seatingClass = input.nextLine();
          while (!seatingClass.equalsIgnoreCase("e") &&
                 !seatingClass.equalsIgnoreCase("f"));
          // If statement to get number of passengers for economy class
          if (seatingClass.equalsIgnoreCase("e")) {
            do {
              System.out.println("Enter the numbers of passengers: ");
              passengers = scan.nextInt();
            while (passengers < 1 || passengers > 3);
          // If statment to get number of passengers for first class
          if (seatingClass.equalsIgnoreCase("f")) {
            do {
              System.out.println("Enter the numbers of passengers: ");
              passengers = scan.nextInt();
            while (passengers < 1 || passengers > 2);
          // Passes info to Reservation class
          reserveSeat = new Reservation(seatingClass, passengers);
          // Prints out seating chart
          System.out.println(reserveSeat);
        // if statement when 2 is chosen to display seating chart
        if (mainOption == 2) {
          System.out.println(displaySeat);
        // if statement when 3 is chosen to quit
        if (mainOption == 3) {
          System.exit(0);
    }  reservation class for adding passengers.
    [codepublic class Reservation {
      private String seatClass;
      private int numPassengers;
      // First class has 8 seats (2 rows of 4 seats each)
      String[] firstClassSeat = new String[8];
    // Economy class has 24 seats (4 rows of 6 seats each)
    String[] economyClassSeat = new String[18];
    // Temp array for first class
    String[] tempArrayF = new String[8];
    // Temp array for economy class
    String[] tempArrayE = new String[18];
    public Reservation(){
    for (int i = 0; i < firstClassSeat.length; i++)
    firstClassSeat[i] = "-";
    for (int i = 0; i < economyClassSeat.length; i++)
    economyClassSeat[i] = "-";
    public Reservation(String c, int p) {
    seatClass = c;
    numPassengers = p;
    for (int i = 0; i < firstClassSeat.length; i++)
    firstClassSeat[i] = "-";
    for (int i = 0; i < economyClassSeat.length; i++)
    economyClassSeat[i] = "-";
    for (int i = 0; i < tempArrayF.length; i++){
    tempArrayF[i] = firstClassSeat;
    for (int i = 0; i < tempArrayE.length; i++){
    tempArrayE[i] = economyClassSeat[i];
    // First class statements
    if (seatClass.equalsIgnoreCase("f")) {
    if (numPassengers == 1){
    int countF = 0;
    for (int i = 0; i < firstClassSeat.length; i++){
    if (countF < 1){
    // If seat is blank - then fill seat with x
    if (firstClassSeat[i] == "-"){
    firstClassSeat[i] = "x";
    countF++;
    // Economy class statements
    if (seatClass.equalsIgnoreCase("e")) {
    if (numPassengers == 1){
    int countE = 0;
    for (int i = 0; i < economyClassSeat.length; i++) {
    if (countE < 1){
    // If seat is blank - then with seat with x
    if (economyClassSeat[i] == "-"){
    economyClassSeat[i] = "x";
    countE++;
    for (int i = 0; i < tempArrayF.length; i++){
    tempArrayF[i] = firstClassSeat[i];
    for (int i = 0; i < tempArrayE.length; i++){
    tempArrayE[i] = economyClassSeat[i];
    Getter Methods
    public String getSeatingClass() {
    return seatClass;
    public int getNumPassengers() {
    return numPassengers;
    public String[] getFirstClassSeat(){
    return firstClassSeat;
    public String[] getEconomyClassCeat(){
    return economyClassSeat;
    public String toString(){
    int f = 0, e = 0, count1;
    String text = "";
    while (f < 8) {
    if (f == 0 || f == 4 || f == 2 || f == 6) {
    text += firstClassSeat[f];
    f++;
    if (f == 1 || f == 5) {
    text += firstClassSeat[f] + "\t";
    f++;
    if (f == 3 || f == 7) {
    text += firstClassSeat[f] + "\n";
    f++;
    while (e < 18) {
    if (e == 0 || e == 1 || e == 3 || e == 4 || e == 6 || e == 7 ||
    e == 9 || e == 10 || e == 12 || e == 13 || e == 15 || e == 16) {
    text += economyClassSeat[e];
    e++;
    if (e == 2 || e == 8 || e == 14) {
    text += economyClassSeat[e] + "\t";
    e++;
    if (e == 5 || e == 11 || e == 17) {
    text += economyClassSeat[e] + "\n";
    e++;
    return text;
    Display Seating chart class
    public class SeatingChart extends Reservation{
      String seatClass;
      int numPassengers;
      // First class has 8 seats (2 rows of 4 seats each)
      String[] firstClassDisplay = new String[8];
      // Economy class has 24 seats (4 rows of 6 seats each)
      String[] economyClassDisplay = new String[24];
      public SeatingChart(){
      public SeatingChart(String[] f, String[] e) {
        firstClassDisplay = f;
        economyClassDisplay = e;
                   Getter Methods
      public String[] getFirstClassDisplay(){
        return firstClassDisplay;
      public String[] getEconomyClassDisplay(){
        return economyClassDisplay;

    Then how do I pass the information and keep the same object and not let it get set skip over the initialation part in Class Reservation so it doesn't go back too "-".
    Heres some updated since we can't edit. But it still doesn't work.
    Main Airline class
    import java.util.*;
    public class Airline {
      public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);
        int mainOption = 0, passengers = 0;
        String seatingClass;
        Reservation reserveSeat;
        SeatingChart displaySeat = new SeatingChart();
        while (mainOption != 3){
          mainOption = 0;
          // Menu loop
          while (mainOption < 1 || mainOption > 3) {
            System.out.println("Welcome to the Airline. Please choose an option.\n");
            System.out.println(
                "Press 1 to add passengers. \nPress 2 to display the " +
                "seating chart. \nPress 3 to Quit.");
            mainOption = scan.nextInt();
        // if statement when 1 is chosen to add passengers
        if (mainOption == 1) {
          Scanner input = new Scanner(System.in);
          // User chooses first or economy class
          do {
            System.out.println("Type E for economy or F for first class:");
            seatingClass = input.nextLine();
          while (!seatingClass.equalsIgnoreCase("e") &&
                 !seatingClass.equalsIgnoreCase("f"));
          // If statement to get number of passengers for economy class
          if (seatingClass.equalsIgnoreCase("e")) {
            do {
              System.out.println("Enter the numbers of passengers: ");
              passengers = scan.nextInt();
            while (passengers < 1 || passengers > 3);
          // If statment to get number of passengers for first class
          if (seatingClass.equalsIgnoreCase("f")) {
            do {
              System.out.println("Enter the numbers of passengers: ");
              passengers = scan.nextInt();
            while (passengers < 1 || passengers > 2);
          // Passes info to Reservation class
          reserveSeat = new Reservation(seatingClass, passengers);
          // Prints out seating chart
          System.out.println(reserveSeat);
        // if statement when 2 is chosen to display seating chart
        if (mainOption == 2) {
          System.out.println(displaySeat);
        // if statement when 3 is chosen to quit
        if (mainOption == 3) {
          System.exit(0);
    }Reservation class
    public class Reservation extends Airline{
      private String seatClass;
      private int numPassengers, count;
      // First class has 8 seats (2 rows of 4 seats each)
      String[] firstClassSeat = new String[8];
      // Economy class has 24 seats (4 rows of 6 seats each)
      String[] economyClassSeat = new String[18];
      // Temp array for first class
      String[] tempArrayF = new String[8];
      // Temp array for economy class
      String[] tempArrayE = new String[18];
      public Reservation(){
        for (int i = 0; i < firstClassSeat.length; i++)
          firstClassSeat[i] = "-";
        for (int i = 0; i < economyClassSeat.length; i++)
          economyClassSeat[i] = "-";
      public Reservation(String c, int p) {
        seatClass = c;
        numPassengers = p;
        if (count < 1){
          for (int i = 0; i < firstClassSeat.length; i++)
            firstClassSeat[i] = "-";
          for (int i = 0; i < economyClassSeat.length; i++)
            economyClassSeat[i] = "-";
        if (count > 0){
          for (int i = 0; i < tempArrayF.length; i++) {
            firstClassSeat[i] = tempArrayF;
    for (int i = 0; i < tempArrayE.length; i++) {
    economyClassSeat[i] = tempArrayE[i];
    // First class statements
    if (seatClass.equalsIgnoreCase("f")) {
    if (numPassengers == 1){
    int countF = 0;
    for (int i = 0; i < firstClassSeat.length; i++){
    if (countF < 1){
    // If seat is blank - then fill seat with x
    if (firstClassSeat[i] == "-"){
    firstClassSeat[i] = "x";
    countF++;
    // Economy class statements
    if (seatClass.equalsIgnoreCase("e")) {
    if (numPassengers == 1){
    int countE = 0;
    for (int i = 0; i < economyClassSeat.length; i++) {
    if (countE < 1){
    // If seat is blank - then with seat with x
    if (economyClassSeat[i] == "-"){
    economyClassSeat[i] = "x";
    countE++;
    for (int i = 0; i < tempArrayF.length; i++){
    tempArrayF[i] = firstClassSeat[i];
    for (int i = 0; i < tempArrayE.length; i++){
    tempArrayE[i] = economyClassSeat[i];
    count++;
    Getter Methods
    public String getSeatingClass() {
    return seatClass;
    public int getNumPassengers() {
    return numPassengers;
    public String[] getFirstClassSeat(){
    return firstClassSeat;
    public String[] getEconomyClassCeat(){
    return economyClassSeat;
    public String toString(){
    int f = 0, e = 0, count1;
    String text = "";
    while (f < 8) {
    if (f == 0 || f == 4 || f == 2 || f == 6) {
    text += firstClassSeat[f];
    f++;
    if (f == 1 || f == 5) {
    text += firstClassSeat[f] + "\t";
    f++;
    if (f == 3 || f == 7) {
    text += firstClassSeat[f] + "\n";
    f++;
    while (e < 18) {
    if (e == 0 || e == 1 || e == 3 || e == 4 || e == 6 || e == 7 ||
    e == 9 || e == 10 || e == 12 || e == 13 || e == 15 || e == 16) {
    text += economyClassSeat[e];
    e++;
    if (e == 2 || e == 8 || e == 14) {
    text += economyClassSeat[e] + "\t";
    e++;
    if (e == 5 || e == 11 || e == 17) {
    text += economyClassSeat[e] + "\n";
    e++;
    return text;
    display seat class
    public class SeatingChart extends Reservation{
      String seatClass;
      int numPassengers;
      // First class has 8 seats (2 rows of 4 seats each)
      String[] firstClassDisplay = new String[8];
      // Economy class has 24 seats (4 rows of 6 seats each)
      String[] economyClassDisplay = new String[24];
      public SeatingChart(){
      public SeatingChart(String[] f, String[] e) {
        firstClassDisplay = f;
        economyClassDisplay = e;
                   Getter Methods
      public String[] getFirstClassDisplay(){
        return firstClassDisplay;
      public String[] getEconomyClassDisplay(){
        return economyClassDisplay;

  • Help with 2D array input using a text file

    I'm writing a JAva program using BlueJ, which requires me to read info from a text file and put them into an 2D array. I got this error msg and I couldn't gifure out how to fix it. Please help me. Thanks a lot. The program is due tomorrow, please help.
    Error message:
    NoSuchElementException:
    null(in Java.util.StringTokenizer)
    Here's the program with the line where the problem is highlighted
    import java.io.*;
    import java.util.StringTokenizer;
    public class ***
    // Reads students' test scores from a file and calculate their final grade
    public static void main (String[] args) throws IOException
    String file1 = "C:/Temp/scores.txt";
    int[][] input = new int[25][5];
    StringTokenizer tokenizer;
    String line;
    FileReader fr = new FileReader (file1);
    BufferedReader inFile = new BufferedReader (fr);
    line = inFile.readLine();
    tokenizer = new StringTokenizer (line);
    for (int row = 0; row < 25; row++)
    for (int col = 0; col < 5; col++)
    input[row][col] = Integer.parseInt(tokenizer.nextToken()); --> porblem
    This is what the text file looks like:
    1 74 85 98
    2 97 76 92
    3 87 86 77
    4 73 85 93
    5 99 99 83
    6 82 84 95
    7 78 83 91
    8 84 79 84
    9 83 77 90
    10 75 78 87
    11 98 79 92
    12 70 73 95
    13 69 80 88
    14 81 77 93
    15 86 72 80
    16 70 76 89
    17 71 71 96
    18 97 81 89
    19 82 90 96
    20 95 85 95
    21 91 82 88
    22 72 94 94

    Try this code..(I've tested this code in my machine and it works fine)
              try {
                   FileReader fileReader = new FileReader("Z:\\fileInput.txt");
                   BufferedReader reader = new BufferedReader(fileReader);
                   int[][] fileData = new int[22][4];
                   StringTokenizer tokenizer = null;
                   String line = reader.readLine();
                   int rowCount = 0;
                   while(line != null) {
                        tokenizer = new StringTokenizer(line, " ");
                        int columnCount = 0;
                        while(tokenizer.hasMoreTokens()) {
                             fileData[rowCount][columnCount] = Integer.valueOf(tokenizer.nextToken()).intValue();
                             columnCount++;
                        line = reader.readLine();
                        rowCount++;
                   fileReader.close();
                   System.out.println("Done");
              } catch (FileNotFoundException fnfe) {
                   System.out.println("File not found " + fnfe);
              } catch (IOException ioe) {
                   System.out.println("IO Exception " + ioe);
    The problem with your code is that you should first check whether there are any tokens before doing nextToken().
    -Amit

Maybe you are looking for

  • Xcode - "The certificate for this server is invalid"

    Hi, I'm trying to log into my Xcode Server (with it's own self-signed certificate) from my work iMac, I receive the following message: "The certificate for this server is invalid. You might be connecting to a server that is pretending to be "[server

  • Laptop-mode draws more power than no laptop-mode

    Hey all, I finally took the plunge and installed laptop-mode-tools. I edited the main configuration file to my liking and enabled those extra powersaving features I need. The other ones I have disabled. However, when I enable laptop-mode my battery i

  • Iphoto 11 9.4.2 won't export slideshow

    This is what I get when I try to export a slideshow. I have a Mac Book Pro 13 running 10.8.2 I have exported several slide shows before with my old white Mac Book. I tried exporting slideshows with only 2 pictures, and still no luck. Any ideas? thank

  • 10.4.10  apps crash on print

    o.k. -here's a new thread on the same topic. i have just upgraded from 10.3.9. to 10.4.10 all apps I tried to print from crash as soon as I'm trying to open the print dialog (problem still prevails as described in other threads) here's what I'd like

  • Sender JMS Adapter

    Hi, I am using a sender JMS adapter. Transport Protocol i have given as "Access JMS Provider with JNDI". In the field "JNDI Server Address" i have to give the server:port. Here i am not sure which port to give. Is it the P4 port i.e. 5XX04 or the J2E