Click here to Skip to main content
       

Java

 
AnswerRe: MS Doc in Java PinmvpRichard MacCutchan11-Feb-13 6:08 
GeneralRe: MS Doc in Java PinmemberThirunavukkarasu Dhanushkodi11-Feb-13 6:13 
AnswerRe: MS Doc in Java PinmemberTorstenH.14-Feb-13 5:03 
QuestionJDBC PinmemberThirunavukkarasu Dhanushkodi9-Feb-13 19:09 
AnswerRe: JDBC PinmvpRichard MacCutchan9-Feb-13 22:38 
AnswerRe: JDBC PinmemberThirunavukkarasu Dhanushkodi11-Feb-13 5:53 
Questionimage and video trapping using with mobile camera in java and j2me language code Pinmemberanand pal8-Feb-13 21:44 
AnswerRe: image and video trapping using with mobile camera in java and j2me language code PinmvpRichard MacCutchan9-Feb-13 0:07 
QuestionHelp me to fix my codes in Java Pinmembermobi358-Feb-13 5:47 
AnswerRe: Help me to fix my codes in Java PinmvpRichard MacCutchan8-Feb-13 6:36 
GeneralRe: Help me to fix my codes in Java Pinmembermobi358-Feb-13 13:13 
GeneralRe: Help me to fix my codes in Java PinmvpRichard MacCutchan8-Feb-13 23:27 
AnswerRe: Help me to fix my codes in Java PinmemberSENTHILKANTH26-Feb-13 2:49 
Questionplease help PinmemberOmarSH7-Feb-13 3: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 Pinmembervenky00287-Feb-13 4:10 
GeneralRe: your solution didnt work [modified] PinmemberOmarSH7-Feb-13 8:55 
AnswerRe: please help Pinmemberjschell7-Feb-13 11:03 
GeneralRe: please help PinmemberOmarSH7-Feb-13 12:00 
GeneralRe: please help PinmvpRichard MacCutchan8-Feb-13 0:12 
AnswerRe: please help Pinmemberpranay198817-Feb-13 4:32 
Questionhelp Pinmemberobamiyijacob6-Feb-13 3:49 
AnswerRe: help PinmvpRichard MacCutchan6-Feb-13 4:13 
Questionneed help Pinmemberobamiyijacob6-Feb-13 3:45 
AnswerRe: need help PinmvpRichard MacCutchan6-Feb-13 4:12 
QuestionGenerate X509 Certificate and Sign it PinmemberAbdullah Alsaadi5-Feb-13 16:11 
AnswerRe: Generate X509 Certificate and Sign it PinmvpSandeep Mewara5-Feb-13 19:37 
GeneralRe: Generate X509 Certificate and Sign it PinmemberAbdullah Alsaadi5-Feb-13 19:54 
GeneralRe: Generate X509 Certificate and Sign it PinmemberTorstenH.5-Feb-13 23:08 
GeneralRe: Generate X509 Certificate and Sign it PinmemberAbdullah Alsaadi6-Feb-13 13:12 
Questionlist and map PinmemberSwarnendu0931-Jan-13 9:40 
AnswerRe: list and map PinmvpRichard MacCutchan31-Jan-13 23:46 
GeneralRe: list and map PinmemberSwarnendu091-Feb-13 4:14 
GeneralRe: list and map PinmvpRichard MacCutchan1-Feb-13 4:58 
GeneralRe: list and map PinmemberRohitS56-Mar-13 22:17 
GeneralRe: list and map PinmvpRichard MacCutchan6-Mar-13 23:07 
QuestionSSL Handshake Exception PinmemberMoustafa8731-Jan-13 2:59 
QuestionCan't able to load a jsp page in Android PinmemberPadma4u30-Jan-13 1:03 
AnswerRe: Can't able to load a jsp page in Android PinmvpRichard MacCutchan30-Jan-13 4:03 
GeneralRe: Can't able to load a jsp page in Android PinmemberPadma4u30-Jan-13 21:43 
GeneralRe: Can't able to load a jsp page in Android PinmvpRichard MacCutchan30-Jan-13 22:56 
QuestionDisadvantages of JAVA in Network Programming Pinmemberirfanulla sharieff28-Jan-13 17:17 
AnswerRe: Disadvantages of JAVA in Network Programming PinmemberPIEBALDconsult28-Jan-13 17:35 
GeneralRe: Disadvantages of JAVA in Network Programming Pinmemberirfanulla sharieff28-Jan-13 18:51 
GeneralRe: Disadvantages of JAVA in Network Programming Pinmemberjschell30-Jan-13 8:55 
AnswerRe: Disadvantages of JAVA in Network Programming PinmvpRichard MacCutchan28-Jan-13 23:56 
AnswerRe: Disadvantages of JAVA in Network Programming Pinmemberjschell29-Jan-13 15:07 
AnswerRe: Disadvantages of JAVA in Network Programming PinmvpRichard MacCutchan29-Jan-13 22:02 
GeneralRe: Disadvantages of JAVA in Network Programming Pinmemberirfanulla sharieff29-Jan-13 22:57 
AnswerRe: Disadvantages of JAVA in Network Programming Pinmemberpasztorpisti30-Jan-13 15:22 
QuestionUnable to load an android application in the emulator PinmemberPadma4u27-Jan-13 21:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    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 | Mobile
Web02 | 2.8.1411023.1 | Last Updated 27 Nov 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid