AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Array um eine stelle Kürzen

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Language (German)
View previous topic :: View next topic  
Author Message
sebbaer
Guest





PostPosted: Tue May 15, 2007 2:13 am    Post subject: Array um eine stelle Kürzen Reply with quote



Ich habe ein Array und möchte den letzten Wert herraus löschen(eine
Stelle kürzen). Ich habe
das jetzt über ein ÜbergangsArray gemacht. Leider bekomme ich aber nur
IndexoutofBounceExceptions.
Vieleicht hat jmd ne Idee.

private static char[] delBlank(char[] chars, int n) {

for (int i=0; i<n; i++) {
if (chars[i] == ' ') {
char[] tmp = new char[chars.length-1];
System.arraycopy(chars, 0, tmp, 0, chars.length-1);
chars = tmp;
chars = delBlank(chars, chars.length);
}//if End
}//for End
return chars;
}//delBlank end

mfg Sebastian
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Language (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.