WCM - Das österreichische Computer Magazin Forenübersicht
 

Zurück   WCM Forum > Rat & Tat > Programmierung

Programmierung Rat & Tat für Programmierer

Microsoft KARRIERECAMPUS

Antwort
 
Themen-Optionen Ansicht
Alt 26.10.2004, 19:28   #1
jak
Inventar
 
Registriert seit: 13.06.2001
Beiträge: 1.830


Standard Telefonnummer in Java

Was ist die Beste Methode um in Java eine Telefon Nummer zu speichern? Ich hab' derzeit Vorwahl als Int und Tel.Nr als double, nur leider werden die Nummern dann mit Kommastellen und 10^x angezeigt
(1.2345678E7 statt 12345678)
(int ist zu klein, Long lässt sich aus irgendeinem Grund nicht parsen).
Jak
____________________________________
Join the DNRC | Godwin\'s Law (thx@stona)
Documentation is like sex: If it\'s good, it\'s very, very good. If it\'s bad, it\'s better than nothing.
\"In theory, theory and practice are the same. In practice, they are not\" (Lawrence Berra)
jak ist offline   Mit Zitat antworten
Alt 26.10.2004, 19:33   #2
_m3
Inventar
 
Registriert seit: 24.09.2001
Beiträge: 7.335


Standard

Als String? Oder gleich ganz elegant als Objekt mit verschiedenen Accessor-Methoden.
____________________________________
Weiterhin zu finden auf http://martin.leyrer.priv.at , http://twitter.com/leyrer , http://www.debattierclub.net/ , http://www.tratschen.at/ und via Instant Messaging auf Jabber: m3 <ät> cargal.org .
_m3 ist offline   Mit Zitat antworten
Alt 27.10.2004, 00:53   #3
jak
Inventar
 
Registriert seit: 13.06.2001
Beiträge: 1.830


Standard

Irgendwie funktionierts jetzt doch mit Long. Ich glaub' ich hab irrtümlich statt long Long verwendet.
Eigenes Object scheidet aus, da es in eine Db muss, und da's jetzt mit Long geht bin ich ganz zufrieden.

Jak
____________________________________
Join the DNRC | Godwin\'s Law (thx@stona)
Documentation is like sex: If it\'s good, it\'s very, very good. If it\'s bad, it\'s better than nothing.
\"In theory, theory and practice are the same. In practice, they are not\" (Lawrence Berra)
jak ist offline   Mit Zitat antworten
Alt 27.10.2004, 07:35   #4
_m3
Inventar
 
Registriert seit: 24.09.2001
Beiträge: 7.335


Standard

Objekt und DB schliesst sich ja nicht gegenseitig aus. Musst halt einen "Serializer" schreiben.
____________________________________
Weiterhin zu finden auf http://martin.leyrer.priv.at , http://twitter.com/leyrer , http://www.debattierclub.net/ , http://www.tratschen.at/ und via Instant Messaging auf Jabber: m3 <ät> cargal.org .
_m3 ist offline   Mit Zitat antworten
Alt 27.10.2004, 10:59   #5
jak
Inventar
 
Registriert seit: 13.06.2001
Beiträge: 1.830


Standard

Stimmt, da's aber im Moment eh mit Long geht, lass ich's so. Wenn ich am Ende noch Zeit hab' änder ich's vielleicht.

Jak
____________________________________
Join the DNRC | Godwin\'s Law (thx@stona)
Documentation is like sex: If it\'s good, it\'s very, very good. If it\'s bad, it\'s better than nothing.
\"In theory, theory and practice are the same. In practice, they are not\" (Lawrence Berra)
jak ist offline   Mit Zitat antworten
Antwort


Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
 
Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.

Gehe zu


Alle Zeitangaben in WEZ +2. Es ist jetzt 14:53 Uhr.


Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Forum SEO by Zoints
© 2009 FSL Verlag