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

Java

 
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 
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 i created
pls help me
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 
GeneralRe: how to write this code Pin
TorstenH.5-Dec-10 20:54
TorstenH.5-Dec-10 20:54 
Questionweb service client Pin
asha_s30-Nov-10 0:50
asha_s30-Nov-10 0:50 
AnswerRe: web service client Pin
427748030-Nov-10 16:26
427748030-Nov-10 16:26 
GeneralRe: web service client [modified] Pin
asha_s1-Dec-10 1:50
asha_s1-Dec-10 1:50 
GeneralRe: web service client Pin
asha_s3-Dec-10 7:42
asha_s3-Dec-10 7:42 
GeneralRe: web service client Pin
asha_s5-Dec-10 0:05
asha_s5-Dec-10 0:05 
QuestionjFuzzy logic or Matlab Pin
mesho27-Nov-10 7:37
mesho27-Nov-10 7:37 
AnswerRe: jFuzzy logic or Matlab Pin
Dr.Walt Fair, PE27-Nov-10 8:41
professionalDr.Walt Fair, PE27-Nov-10 8:41 
AnswerRe: jFuzzy logic or Matlab Pin
427748029-Nov-10 20:14
427748029-Nov-10 20:14 
QuestionFlatten or Merge PDF with PDFBox Pin
GlobX25-Nov-10 19:08
GlobX25-Nov-10 19:08 
AnswerRe: Flatten or Merge PDF with PDFBox Pin
Nagy Vilmos25-Nov-10 22:44
professionalNagy Vilmos25-Nov-10 22:44 

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.