Click here to Skip to main content
15,900,616 members
Home / Discussions / Java
   

Java

 
QuestionProblem with ArrayLists java Pin
nikosv21-Jan-12 21:04
nikosv21-Jan-12 21:04 
AnswerRe: Problem with ArrayLists java Pin
Richard MacCutchan21-Jan-12 23:05
mveRichard MacCutchan21-Jan-12 23:05 
QuestionHelp with adding jPanel Form to other form Pin
_T("No name")21-Jan-12 5:53
_T("No name")21-Jan-12 5:53 
AnswerRe: Help with adding jPanel Form to other form Pin
TorstenH.22-Jan-12 21:42
TorstenH.22-Jan-12 21:42 
QuestionMultithreaded proxy server Pin
prateek.rajan8919-Jan-12 16:29
prateek.rajan8919-Jan-12 16:29 
AnswerRe: Multithreaded proxy server Pin
Peter_in_278019-Jan-12 17:41
professionalPeter_in_278019-Jan-12 17:41 
AnswerRe: Multithreaded proxy server Pin
jschell20-Jan-12 12:49
jschell20-Jan-12 12:49 
Questioncode problem Pin
nikhil_kumar19-Jan-12 11:04
nikhil_kumar19-Jan-12 11:04 
C#
import java.io.*;
class print
{
public static void main(String[] args)
{
int[] a = new int[20];
int i=0;
while(i<20)
{
a[i] = i;
System.out.println(a[i]);
i++;
}
}
}
output of above code is :<pre lang="vb">0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18



while output of:
C#
import java.io.*;
class print
{
public static void main(String[] args)
{
int[] a = new int[20];
int i=0;
while(i<20)
{
a[i] = i;
i++;
System.out.println(a[i]);

}
}
}


0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 20
at print.main(print.java:12)
Plz expalin why "i++" make large difference..
Thnx in advance..

modified 19-Jan-12 17:16pm.

AnswerRe: code problem Pin
TorstenH.19-Jan-12 21:34
TorstenH.19-Jan-12 21:34 
GeneralRe: code problem Pin
nikhil_kumar21-Jan-12 9:10
nikhil_kumar21-Jan-12 9:10 
GeneralRe: code problem Pin
♥…ЯҠ…♥12-Feb-12 17:41
professional♥…ЯҠ…♥12-Feb-12 17:41 
AnswerRe: code problem Pin
♥…ЯҠ…♥12-Feb-12 17:14
professional♥…ЯҠ…♥12-Feb-12 17:14 
Questionsource code Pin
bhanu.pratap.9918-Jan-12 2:46
bhanu.pratap.9918-Jan-12 2:46 
AnswerRe: source code Pin
Richard MacCutchan18-Jan-12 3:00
mveRichard MacCutchan18-Jan-12 3:00 
AnswerRe: source code Pin
Nagy Vilmos18-Jan-12 3:03
professionalNagy Vilmos18-Jan-12 3:03 
AnswerRe: source code Pin
TorstenH.18-Jan-12 3:23
TorstenH.18-Jan-12 3:23 
AnswerRe: source code Pin
SilimSayo26-Jan-12 6:49
SilimSayo26-Jan-12 6:49 
QuestionHow to write a program in java which stores every thing i type anywhere in a file Pin
anilgoyal128915-Jan-12 18:25
anilgoyal128915-Jan-12 18:25 
AnswerRe: How to write a program in java which stores every thing i type anywhere in a file Pin
Richard MacCutchan15-Jan-12 21:28
mveRichard MacCutchan15-Jan-12 21:28 
AnswerRe: How to write a program in java which stores every thing i type anywhere in a file Pin
TorstenH.15-Jan-12 21:30
TorstenH.15-Jan-12 21:30 
GeneralRe: How to write a program in java which stores every thing i type anywhere in a file Pin
anilgoyal128919-Jan-12 19:53
anilgoyal128919-Jan-12 19:53 
GeneralRe: How to write a program in java which stores every thing i type anywhere in a file Pin
TorstenH.23-Jan-12 19:34
TorstenH.23-Jan-12 19:34 
AnswerRe: How to write a program in java which stores every thing i type anywhere in a file Pin
Nagy Vilmos18-Jan-12 3:05
professionalNagy Vilmos18-Jan-12 3:05 
GeneralRe: How to write a program in java which stores every thing i type anywhere in a file Pin
TorstenH.18-Jan-12 3:22
TorstenH.18-Jan-12 3:22 
GeneralRe: How to write a program in java which stores every thing i type anywhere in a file Pin
anilgoyal128919-Jan-12 19:50
anilgoyal128919-Jan-12 19:50 

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.