Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding
You last visited: Today at 02:31

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Java]Array vom Typ String > Inhalt ausgeben lassen

Discussion on [Java]Array vom Typ String > Inhalt ausgeben lassen within the General Coding forum part of the Coders Den category.

Closed Thread
 
Old   #1
 
QR~'s Avatar
 
elite*gold: 1
Join Date: May 2010
Posts: 707
Received Thanks: 157
[Java]Array vom Typ String > Inhalt ausgeben lassen

Ahoi epvp,

Code:
String[] array= {"x", "y"};
Es handelt sich um diesen Array vom Typ String.
Der befindet sich in Klasse "mitarbeiterSuche", allerdings
will ich ihn in der Klasse "main" ausgeben.

Woran kann das liegen? Eclipse sagt mir dauernd:
"array cannot be resolved to a variable"

kind regards
QR~ is offline  
Old 10/29/2012, 23:42   #2

 
Obilee's Avatar
 
elite*gold: 144
Join Date: May 2007
Posts: 62,459
Received Thanks: 29,541
Zeig mal den Code im Main.
Wie hast du das Array in deiner Klasse deklariert ? Hast du nen Getter ?
Wenn du es einfach auf der Konsole ausgeben willst kannst du auch " Arrays.toString(array)" benutzen um nen einfachen String zu bekommen.

Ansonsten hört sich das nach nem scope fehler an.
Obilee is offline  
Old 10/30/2012, 18:07   #3
 
QR~'s Avatar
 
elite*gold: 1
Join Date: May 2010
Posts: 707
Received Thanks: 157
Für alle, die sich dafür interessieren:

Code:
public void mitarbeiterListe() {
	String[] Liste = {"Person x", "Person y"};
	
	for (int i = 0; i < Liste.length; i++) {
		System.out.println(Liste[i] + ",");
	}
}
Damit hab ich es gelöst.
QR~ is offline  
Closed Thread


Similar Threads Similar Threads
Array subvariable ohne inhalt
10/03/2012 - AutoIt - 7 Replies
Hi, ich hab mal ne kurze frage. Ich hab ein Array = $Statistik. Es wird durch ein _stringbetween gefüllt. Jedoch wird die subvariable "" von $Statistik nur beliebig gefüllt. D.h. 1-7 sind immer güfllt. Nummer ist entweder mit nem string gefüllt oder leer. - sind sozusagen auch immer voll. Das Problem ist, dass ich - in einem label ausgebe. Und da ja nicht immer belegt ist, gibts einen error. Ich lasse $Statistik schon durch Isarray überprüfen. Wie kann ich jetzt sagen, dass nur...
Visual Basic - String Split -> Array -> Datatable
09/03/2012 - .NET Languages - 2 Replies
Hallo Leute, ich benötige Hilfe mein Array in eine Datatable zu schreiben Mein Code For Each oFile In oFiles aryTextFile = oFile.Name.Split("_")
[Frage] String zu Array of Byte
02/28/2012 - AutoIt - 1 Replies
- Hat sich geklärt. Das Thema kann geschlossen werden -
Array ausgeben
02/24/2012 - AutoIt - 3 Replies
Hey, ich hab grad irwi ne denkblockade also: Global $player = , , , , , , , ] #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3>
[Resource] ASCII String & Byte Array Converter
11/14/2010 - CO2 PServer Guides & Releases - 9 Replies
#deleted



All times are GMT +1. The time now is 02:31.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.