Click here to Skip to main content
15,908,013 members
Home / Discussions / Java
   

Java

 
AnswerRe: Printing the contents of a collection Pin
David Skelly6-Dec-10 2:09
David Skelly6-Dec-10 2:09 
AnswerRe: Printing the contents of a collection Pin
Alok Sharma ji7-Dec-10 1:32
Alok Sharma ji7-Dec-10 1:32 
AnswerRe: Printing the contents of a collection Pin
Ramaiah Raj30-Jan-11 20:30
Ramaiah Raj30-Jan-11 20:30 
Questionintegrating a Map and GIS in a java path finding simulator Pin
amit ofer3-Dec-10 21:11
amit ofer3-Dec-10 21:11 
AnswerRe: integrating a Map and GIS in a java path finding simulator Pin
Skynet_Code5-Dec-10 20:48
Skynet_Code5-Dec-10 20:48 
GeneralRe: integrating a Map and GIS in a java path finding simulator Pin
amit ofer5-Dec-10 21:27
amit ofer5-Dec-10 21:27 
GeneralRe: integrating a Map and GIS in a java path finding simulator Pin
Skynet_Code6-Dec-10 0:08
Skynet_Code6-Dec-10 0:08 
Questionhow toinput into array from keyboard Pin
atoivan3-Dec-10 16:15
atoivan3-Dec-10 16:15 
i want to write a a program that will accept student name and grades and output it.use an array data structure in the implementation this program and implement the following

write method that will traverses the array and allow the user to perform the following processes

a) search for a particular student and his or her marks
b)find the average of all the student in the class
c)find all student with a mark below 50 and output them.

i started off with this codes

import java.util.Scanner;
//import java.lang.String;
public class Main {
public static int n;
//public static String names;
//private static String[] nameS;
//private static String[] nameS;
/**
* @param args the command line arguments
*/

public static void main(String[] args/*,String[] nameS*/) {
Scanner in=new Scanner(System.in);
int Da=0;
int num []=new int[n];
//int x=0;


System.out.printf("%s\n","Enter the Number of student taking This Couse");
n=in.nextInt();
String name[]=new String [n];
System.out.printf("%s %s \n", "index","value");
for (; Da < name.length; Da++ )/*Da 4 Display array*/ {
System.out.printf( "%5d%8d\n", Da, name[Da] );
}
System.out.println("Enter the names of the student");
String names;
names=in.nextLine();
name[n] = new String(names);
for (; Da < name.length; Da++ ){
System.out.printf( "%5d%8d\n", Da, name[Da] );
}




}
}

i can not input the names into the array( name) i created
pls help me
AnswerRe: how toinput into array from keyboard Pin
Dr.Walt Fair, PE3-Dec-10 16:35
professionalDr.Walt Fair, PE3-Dec-10 16:35 
QuestionProfile visits using FB api Pin
nachiket dave2-Dec-10 1:06
nachiket dave2-Dec-10 1:06 
AnswerRe: Profile visits using FB api Pin
Nagy Vilmos2-Dec-10 1:10
professionalNagy Vilmos2-Dec-10 1:10 
GeneralRe: Profile visits using FB api Pin
TorstenH.2-Dec-10 2:39
TorstenH.2-Dec-10 2:39 
Questionhow to write this code Pin
atoivan2-Dec-10 0:28
atoivan2-Dec-10 0:28 
AnswerRe: how to write this code Pin
Nagy Vilmos2-Dec-10 0:37
professionalNagy Vilmos2-Dec-10 0:37 
AnswerRe: how to write this code Pin
TorstenH.2-Dec-10 2:44
TorstenH.2-Dec-10 2:44 
AnswerRe: how to write this code Pin
CodingLover2-Dec-10 23:43
CodingLover2-Dec-10 23:43 
QuestionRe: how to write this code Pin
atoivan3-Dec-10 15:44
atoivan3-Dec-10 15:44 
AnswerRe: how to write this code Pin
TorstenH.5-Dec-10 20:52
TorstenH.5-Dec-10 20:52 
QuestionRe: how to write this code Pin
atoivan3-Dec-10 15:55
atoivan3-Dec-10 15:55 
AnswerRe: how to write this code Pin
Dr.Walt Fair, PE3-Dec-10 16:34
professionalDr.Walt Fair, PE3-Dec-10 16:34 
QuestionRe: how to write this code Pin
atoivan3-Dec-10 16:49
atoivan3-Dec-10 16:49 
AnswerRe: how to write this code Pin
Dr.Walt Fair, PE3-Dec-10 16:58
professionalDr.Walt Fair, PE3-Dec-10 16:58 
AnswerRe: how to write this code Pin
LloydA1113-Dec-10 1:33
LloydA1113-Dec-10 1:33 
GeneralRe: how to write this code Pin
Nagy Vilmos3-Dec-10 3:57
professionalNagy Vilmos3-Dec-10 3:57 
GeneralRe: how to write this code Pin
LloydA1113-Dec-10 4:01
LloydA1113-Dec-10 4:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.