This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Five Marks columns (Arrays) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Five Marks columns (Arrays)" Watch "Five Marks columns (Arrays)" New topic

Five Marks columns (Arrays)

Chris Downs

Joined: Nov 19, 2009
Posts: 1
Hi all,

I'm new to Java and this Forum so do bare with me if i make myself look stupid!!!

I have a task on my Programming course that requires me to use a integer array with an initialisation list of five marks.

I need the program to display two columns, one being peoples names and the other being the marks. I have figured how to get the names on a earlier program but now i'm struggling to get both marks and names together. I'm not asking you to give me the program but i need a little help to help me finish this small program.

Thanks for your time!!


This is the code i have so far!!!

import java.util.*;

public class fivemarks

public static void main(String[] args)
String[] name =
{"Chris Downs", "Jacob Cracker",
"Dee Mcgee", "Jack Dee", "Chloe Morrow"};

int[] mark = {78, 45, 48, 95, 22};

for (int i=0; i<1; i++)(String person:name)
System.out.println("\t\t\t\t\t\t" + person + mark[i]);




I'm sure the first bit is ok, the last bit i'm not to sure about!!

Lee Kian Giap
Ranch Hand

Joined: Jan 23, 2008
Posts: 213
Please use the code tag ...

Have you compile it ? what it shows ? and how you think ?

Albareto McKenzie
Ranch Hand

Joined: Apr 08, 2009
Posts: 299
Chris Downs wrote:

Why do you do this?
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Five Marks columns (Arrays)
jQuery in Action, 3rd edition