![]() |
![]() |
|
|
|||||||
| Programmierung Rat & Tat für Programmierer |
![]() |
|
|
Themen-Optionen | Ansicht |
|
|
#1 |
|
Inventar
![]() Registriert seit: 13.06.2001
Beiträge: 1.830
|
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) |
|
|
|
|
|
#2 |
|
Inventar
![]() Registriert seit: 24.09.2001
Beiträge: 7.335
|
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 . |
|
|
|
|
|
#3 |
|
Inventar
![]() Registriert seit: 13.06.2001
Beiträge: 1.830
|
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) |
|
|
|
|
|
#4 |
|
Inventar
![]() Registriert seit: 24.09.2001
Beiträge: 7.335
|
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 . |
|
|
|
|
|
#5 |
|
Inventar
![]() Registriert seit: 13.06.2001
Beiträge: 1.830
|
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) |
|
|
|
![]() |
| Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1) | |
|
|