Click here to Skip to main content
15,916,215 members
Home / Discussions / Java
   

Java

 
AnswerRe: applet image loading problem Pin
Nagy Vilmos9-Nov-10 23:16
professionalNagy Vilmos9-Nov-10 23:16 
GeneralRe: applet image loading problem Pin
ekba8910-Nov-10 11:15
ekba8910-Nov-10 11:15 
GeneralRe: applet image loading problem Pin
ekba8912-Nov-10 11:30
ekba8912-Nov-10 11:30 
AnswerRe: applet image loading problem Pin
ekba8912-Nov-10 12:49
ekba8912-Nov-10 12:49 
Questionwhy can't I figure out array input Pin
LORDA127-Nov-10 23:08
LORDA127-Nov-10 23:08 
AnswerRe: why can't I figure out array input Pin
Cedric Moonen7-Nov-10 23:27
Cedric Moonen7-Nov-10 23:27 
GeneralRe: why can't I figure out array input Pin
LORDA127-Nov-10 23:41
LORDA127-Nov-10 23:41 
GeneralRe: why can't I figure out array input Pin
Cedric Moonen7-Nov-10 23:54
Cedric Moonen7-Nov-10 23:54 
LORDA12 wrote:
The problem is not there. Java initializes automatic to 0.


There's certainly a problem there anyway: first you shouldn't relly on initialization, this is a very habbit, and second even if everything is initialized at 0, it means that you will always store your character in the first element of your array (all the elements of your array are initially 0, so if you iterate over them and do client[i], it will always point to the first element of your array).

Furthermore, did you look at the documentation of System.in.read ? It doesn't accept any parameter and returns a character. So, you have to write it this way:
client[i] = System.in.read();


Also, as it is returning a character, you should store the return values inside a character array. What do you want to do exactly ? Ask the user to type in numbers (so, he can enter several characters for one element of your entry) or ask the user to type in characters (one character for each element of your array) ? This makes a big difference.
Cédric Moonen
Software developer

Charting control [v3.0]
OpenGL game tutorial in C++

AnswerRe: why can't I figure out array input Pin
Luc Pattyn8-Nov-10 2:01
sitebuilderLuc Pattyn8-Nov-10 2:01 
AnswerRe: why can't I figure out array input [modified] Pin
Nagy Vilmos8-Nov-10 2:55
professionalNagy Vilmos8-Nov-10 2:55 
AnswerRe: why can't I figure out array input Pin
moxwose18-Nov-10 23:22
moxwose18-Nov-10 23:22 
QuestionAndroid Mobile Application Pin
Smaini Nurbs7-Nov-10 2:51
Smaini Nurbs7-Nov-10 2:51 
AnswerRe: Android Mobile Application Pin
Richard MacCutchan7-Nov-10 5:41
mveRichard MacCutchan7-Nov-10 5:41 
QuestionAndroid Stopwatch Pin
Smaini Nurbs7-Nov-10 2:46
Smaini Nurbs7-Nov-10 2:46 
AnswerRe: Android Stopwatch Pin
TorstenH.7-Nov-10 21:14
TorstenH.7-Nov-10 21:14 
Questionvideo handling in java Pin
kinl5-Nov-10 21:55
kinl5-Nov-10 21:55 
AnswerRe: video handling in java Pin
Richard MacCutchan5-Nov-10 23:30
mveRichard MacCutchan5-Nov-10 23:30 
QuestionMessage Removed Pin
5-Nov-10 21:15
kingnking5-Nov-10 21:15 
AnswerRe: help with HMM and GMM Pin
Richard MacCutchan5-Nov-10 23:28
mveRichard MacCutchan5-Nov-10 23:28 
GeneralRe: help with HMM and GMM Pin
kingnking6-Nov-10 2:11
kingnking6-Nov-10 2:11 
QuestionArrayList Class Pin
ammu233-Nov-10 3:43
ammu233-Nov-10 3:43 
AnswerRe: ArrayList Class Pin
TorstenH.3-Nov-10 21:57
TorstenH.3-Nov-10 21:57 
AnswerRe: ArrayList Class Pin
jschell4-Nov-10 8:40
jschell4-Nov-10 8:40 
QuestionHibernate from Eclipse to NetBeans Pin
CostasAn2-Nov-10 23:37
CostasAn2-Nov-10 23:37 
AnswerRe: Hibernate from Eclipse to NetBeans Pin
Nagy Vilmos2-Nov-10 23:48
professionalNagy Vilmos2-Nov-10 23:48 

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.