Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

split

Empfohlene Antworten

Veröffentlicht

Hallo!

ich bekomme in der folgenden Zeile die meldung:

cannot resolve symbol : method split

=> String token [] = line.split("=");

folgendes will ich tun:

String line = br.readLine();

String token [] = line.split("=");

map.put(token[0].trim(), token[1].trim());

was ist falsch???

Ich würde dafür eher den StringTokenizer nehmen!

Ist meiner meinung nach wesentlich einfacher zu handhaben.

StringTokenizer st = new StringTokenizer(-eingabestring-,-trennzeichen-);

String t1 = st.nextToken();

String t2 = st.nextToken();

map.put(t1,t2);

Eigentlich sieht die Funktion gut aus und split("=") reicht sollte als Regex ausreichen.

Aber split funktioniert erst ab Java Version 1.4? Welche Version setzt du ein?

@krain thx hat geklappt

@-leliel- hab ich auch schon versucht...

@master ich hab 1.4.1

ich wünsche ein schönes wochenende und vielen dank für eure tolle hilfe!!!

bis denn

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.