Click here to Skip to main content
13,143,637 members (30,495 online)
   

Java

 
Questionimage and video trapping using with mobile camera in java and j2me language code Pin
anand pal8-Feb-13 20:44
memberanand pal8-Feb-13 20:44 
AnswerRe: image and video trapping using with mobile camera in java and j2me language code Pin
Richard MacCutchan8-Feb-13 23:07
mvpRichard MacCutchan8-Feb-13 23:07 
QuestionHelp me to fix my codes in Java Pin
mobi358-Feb-13 4:47
membermobi358-Feb-13 4:47 
AnswerRe: Help me to fix my codes in Java Pin
Richard MacCutchan8-Feb-13 5:36
mvpRichard MacCutchan8-Feb-13 5:36 
GeneralRe: Help me to fix my codes in Java Pin
mobi358-Feb-13 12:13
membermobi358-Feb-13 12:13 
GeneralRe: Help me to fix my codes in Java Pin
Richard MacCutchan8-Feb-13 22:27
mvpRichard MacCutchan8-Feb-13 22:27 
AnswerRe: Help me to fix my codes in Java Pin
SENTHILKANTH26-Feb-13 1:49
memberSENTHILKANTH26-Feb-13 1:49 
Questionplease help Pin
OmarSH7-Feb-13 2:41
memberOmarSH7-Feb-13 2:41 
some one please tell me what is the problem
here is the code
            public class sortm {
	public static void main(String args[])
	{
		
		int a[]={5,3,7,2,8};
		int b[]={1,9,4,8,10};
		int i=1;
		int j=1;
		int t=0;
		int s=0;
		for( i=1;i<=5;i++)
		{
			if(a[i]>a[i+1])
				t=a[i];
			a[i]=a[i+1];
			a[i+1]=t;
			
		}
		for( i=1;i<=5;i++){
		System.out.println(a[i]);
		}
		
		for(j=0;j<=5;j++)
		{
			if(b[j]>b[j+1])
				s=b[j];
			b[j]=b[j+1];
			b[j+1]=s;
		}
		for(j=0;j<=5;j++)
		{
			System.out.println(b[j]);
		}
	}
 
}

and this what running say :
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 5
at sortm.main(sortm.java:14)
Answersolution for your problem Pin
venky00287-Feb-13 3:10
membervenky00287-Feb-13 3:10 
GeneralRe: your solution didnt work Pin
OmarSH7-Feb-13 7:55
memberOmarSH7-Feb-13 7:55 
AnswerRe: please help Pin
jschell7-Feb-13 10:03
memberjschell7-Feb-13 10:03 
GeneralRe: please help Pin
OmarSH7-Feb-13 11:00
memberOmarSH7-Feb-13 11:00 
GeneralRe: please help Pin
Richard MacCutchan7-Feb-13 23:12
mvpRichard MacCutchan7-Feb-13 23:12 
AnswerRe: please help Pin
pranay198817-Feb-13 3:32
memberpranay198817-Feb-13 3:32 
Questionhelp Pin
obamiyijacob6-Feb-13 2:49
memberobamiyijacob6-Feb-13 2:49 
AnswerRe: help Pin
Richard MacCutchan6-Feb-13 3:13
mvpRichard MacCutchan6-Feb-13 3:13 
Questionneed help Pin
obamiyijacob6-Feb-13 2:45
memberobamiyijacob6-Feb-13 2:45 
AnswerRe: need help Pin
Richard MacCutchan6-Feb-13 3:12
mvpRichard MacCutchan6-Feb-13 3:12 
QuestionGenerate X509 Certificate and Sign it Pin
Abdullah Alsaadi5-Feb-13 15:11
memberAbdullah Alsaadi5-Feb-13 15:11 
AnswerRe: Generate X509 Certificate and Sign it Pin
Sandeep Mewara5-Feb-13 18:37
mvpSandeep Mewara5-Feb-13 18:37 
GeneralRe: Generate X509 Certificate and Sign it Pin
Abdullah Alsaadi5-Feb-13 18:54
memberAbdullah Alsaadi5-Feb-13 18:54 
GeneralRe: Generate X509 Certificate and Sign it Pin
TorstenH.5-Feb-13 22:08
memberTorstenH.5-Feb-13 22:08 
GeneralRe: Generate X509 Certificate and Sign it Pin
Abdullah Alsaadi6-Feb-13 12:12
memberAbdullah Alsaadi6-Feb-13 12:12 
Questionlist and map Pin
Swarnendu0931-Jan-13 8:40
memberSwarnendu0931-Jan-13 8:40 
AnswerRe: list and map Pin
Richard MacCutchan31-Jan-13 22:46
mvpRichard MacCutchan31-Jan-13 22:46 

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.


Advertise | Privacy |
Web01 | 2.8.170915.1 | Last Updated 14 Sep 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid