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.

Empfohlene Antworten

Veröffentlicht

hi ich habe folgende methode.


public static  int IP(int a, int b, int c, int d) {

		return ((a & 0xFF) << 24) | ((b & 0xFF) << 16) | ((c & 0xFF) << 8)

				| (d & 0xFF);

	}

die soll mir ein eine IP addresse in ein Integer umwandeln.

Wenn ich nun zum beispiel: 210.94.10.1 eingeben will, dann müsste ja eigentlich als integer 3529378305 rauskommen.

Komischerweisse kommt bei mir sowas -765588991 raus?

Versteh ich nicht so ganz. Kann mir da einer weiterhelfen?

unsigned int sollte helfen
Seit wann gibt's das denn bei Java?

Ansonsten: einfach Long nehmen. Und beim ausrechnen das casten nicht vergessen, sonst wird das Ergebnis zwar ein Long, die Rechnung bleibt aber int.

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

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.