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.

String auf nummerisch Prüfen

Empfohlene Antworten

Veröffentlicht

Hallo allerseits,

ich muß euch jetzt mal als Fachliteratur missbrauchen (neue dt. Rechtschreibung ???), komme an meine zur Zeit leider nicht ran...

:o(

ich muß einen String prüfen, ob er nur nummerische Werte enthält... ich weiß, das man da auch schnell selbst eine Prüfung schreiben kann, aber warum neu erfinden, wenn es so etwas schon gibt und geben tut es so was bestimmt.

ich weiß nicht, ob man den String einfach in einen new Integer(sString) umwandeln kann und er bei einem Buchstaben, eine Fehlermeldung bringt, aber mein Probelm ist, ich muß auch Zahlen prüfen können, die größer als die zulässigen Integer-Werte sind. Also bleibt nur ein Long, aber der lässt meines wissens leider, Punkte zu :o(

Chipsy

float f=0;

try {

f=Float.parseFloaf(derString);

} catch (NumberFormatException e) {System.err.println("keine Zahl")}

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.