Dsy Network www | forum | my | didattica | howto | wiki | el goog | stats | blog | dona | rappresentanti
Homepage
 Register   Calendar   Members  Faq   Search  Logout 
.dsy:it. : Powered by vBulletin version 2.3.1 .dsy:it. > Didattica > Corsi A - F > Fondamenti di architettura e programmazione > [Java] Maledette Eccezioni...
Pages (3): « 1 2 [3]   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
Crashman
.simpatizzante.

User info:
Registered: Jun 2005
Posts: 19 (0.00 al dì)
Location: Milano
Corso: Comunicazione Digitale
Anno: Primo
Time Online: 13:46:48 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

code:
{ decremento= ((int)memoria.get(variabile)) - decremento; memoria.remove(variabile); memoria.put(variabile,((Integer) decremento);}

Tutto questo si poteva fare in un unica istruzione :)

__________________
"Overcome the devils with a thing called love"
Msn: crashman86@hotmail.com
Futuro programmatore grafico :)

07-02-2006 19:46
Click Here to See the Profile for Crashman Click here to Send Crashman a Private Message Find more posts by Crashman Add Crashman to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Skioda86
.precettore.

User info:
Registered: Jun 2005
Posts: 90 (0.01 al dì)
Location: Borno (BS)
Corso: Comunicazione Digitale
Anno: 1
Time Online: 21:00:29 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Crashman

code: {
decremento= ((int)memoria.get(variabile)) - decremento;
memoria.remove(variabile);
memoria.put(variabile,((Integer) decremento);}


Tutto questo si poteva fare in un unica istruzione :)


Posso sapere quale??? Usando il set...qualcosa che ora non ricordo??? :D THANKS....






W OPEN SOURCE!!!!

__________________
- - {[( KEVIN HIGHT FLY)]} - -

07-02-2006 20:54
Click Here to See the Profile for Skioda86 Click here to Send Skioda86 a Private Message Visit Skioda86's homepage! Find more posts by Skioda86 Add Skioda86 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Skioda86
.precettore.

User info:
Registered: Jun 2005
Posts: 90 (0.01 al dì)
Location: Borno (BS)
Corso: Comunicazione Digitale
Anno: 1
Time Online: 21:00:29 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged


Crashman

code: {
decremento= ((int)memoria.get(variabile)) - decremento;
memoria.remove(variabile);
memoria.put(variabile,((Integer) decremento);}


Tutto questo si poteva fare in un unica istruzione :)



L'istruzione a cui ti riferivi era forse:

memoria.put(variabile,(memoria.get(variabile) - ((Integer)decremento));

:D :D :D ::pc:
Ma sai...preferisco agire di mano mia sulla hashtable...almeno "sò" cosa stò facendo....O ALMENO SI SPERA
:):):)


W OPEN SOURCE

__________________
- - {[( KEVIN HIGHT FLY)]} - -

08-02-2006 09:57
Click Here to See the Profile for Skioda86 Click here to Send Skioda86 a Private Message Visit Skioda86's homepage! Find more posts by Skioda86 Add Skioda86 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Drowne
Java Tentonaro

User info:
Registered: Jan 2005
Posts: 230 (0.03 al dì)
Location: Milano
Corso: Comunicazione digitale
Anno: primo
Time Online: 2 Days, 0:03:13 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

C'è bisogno di fare il remove prima di fare un put o è solo una precauzione?

08-02-2006 19:44
Click Here to See the Profile for Drowne Click here to Send Drowne a Private Message Visit Drowne's homepage! Find more posts by Drowne Add Drowne to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Joda
.grande:maestro.

User info:
Registered: Mar 2003
Posts: 1126 (0.14 al dì)
Location: Milano
Corso: Dottore in Informatica
Anno: Primo TICOM
Time Online: 9 Days, 23:17:40 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Drowne
C'è bisogno di fare il remove prima di fare un put o è solo una precauzione?


dipende dal contesto, puoi fare anke un set (sempre se si può ora non ricordo) ?

__________________
Homepage personale (English version)
c/o segreteria didattica via comelico

Last edited by Joda on 08-02-2006 at 19:49

08-02-2006 19:46
Click Here to See the Profile for Joda Click Here to See the Blog of Joda Click here to Send Joda a Private Message Visit Joda's homepage! Find more posts by Joda Add Joda to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Drowne
Java Tentonaro

User info:
Registered: Jan 2005
Posts: 230 (0.03 al dì)
Location: Milano
Corso: Comunicazione digitale
Anno: primo
Time Online: 2 Days, 0:03:13 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

come si usa il set, scusami?

se faccio memoria.set(variabile,valore); da errore in compilazione...

08-02-2006 20:25
Click Here to See the Profile for Drowne Click here to Send Drowne a Private Message Visit Drowne's homepage! Find more posts by Drowne Add Drowne to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Joda
.grande:maestro.

User info:
Registered: Mar 2003
Posts: 1126 (0.14 al dì)
Location: Milano
Corso: Dottore in Informatica
Anno: Primo TICOM
Time Online: 9 Days, 23:17:40 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Drowne
come si usa il set, scusami?

se faccio memoria.set(variabile,valore); da errore in compilazione...


puodarsi che non sia un metodo supportato, ora non mi ricordo... controlla nella doc della hashtable.

__________________
Homepage personale (English version)
c/o segreteria didattica via comelico

08-02-2006 20:45
Click Here to See the Profile for Joda Click Here to See the Blog of Joda Click here to Send Joda a Private Message Visit Joda's homepage! Find more posts by Joda Add Joda to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
sbrandu
.consigliere.

User info:
Registered: May 2004
Posts: 148 (0.02 al dì)
Location:
Corso:
Anno:
Time Online: 3 Days, 21:31:08: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Nessuno è riuscito a sbrogliare il problema dell'indentazione?

08-02-2006 20:47
Click Here to See the Profile for sbrandu Click here to Send sbrandu a Private Message Find more posts by sbrandu Add sbrandu to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
sbrandu
.consigliere.

User info:
Registered: May 2004
Posts: 148 (0.02 al dì)
Location:
Corso:
Anno:
Time Online: 3 Days, 21:31:08: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Nessuno è riuscito a sbrogliare il problema dell'indentazione?
Io ci sto provando cercando di utilizzare come aveva detto qualcuno il metoto istanceof, ma è come se java non lo riconoscesse..

08-02-2006 20:48
Click Here to See the Profile for sbrandu Click here to Send sbrandu a Private Message Find more posts by sbrandu Add sbrandu to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Crashman
.simpatizzante.

User info:
Registered: Jun 2005
Posts: 19 (0.00 al dì)
Location: Milano
Corso: Comunicazione Digitale
Anno: Primo
Time Online: 13:46:48 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by sbrandu
Nessuno è riuscito a sbrogliare il problema dell'indentazione?
Io ci sto provando cercando di utilizzare come aveva detto qualcuno il metoto istanceof, ma è come se java non lo riconoscesse..

Non serve istanceof...
la soluzione a questo problema è decisamente più facile di quello che pensate ;)

__________________
"Overcome the devils with a thing called love"
Msn: crashman86@hotmail.com
Futuro programmatore grafico :)

08-02-2006 20:55
Click Here to See the Profile for Crashman Click here to Send Crashman a Private Message Find more posts by Crashman Add Crashman to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Drowne
Java Tentonaro

User info:
Registered: Jan 2005
Posts: 230 (0.03 al dì)
Location: Milano
Corso: Comunicazione digitale
Anno: primo
Time Online: 2 Days, 0:03:13 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

ok, nulla avevo scritto una stronzata ^_^


edit :D

Last edited by Drowne on 08-02-2006 at 21:09

08-02-2006 20:59
Click Here to See the Profile for Drowne Click here to Send Drowne a Private Message Visit Drowne's homepage! Find more posts by Drowne Add Drowne to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Crashman
.simpatizzante.

User info:
Registered: Jun 2005
Posts: 19 (0.00 al dì)
Location: Milano
Corso: Comunicazione Digitale
Anno: Primo
Time Online: 13:46:48 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Drowne
qualcuno mi sa dire se questa identazione va bene?


No l'identazione corretta è questa:
code:
crashman@linux> java Programma 3 4 DECLARE s; DECLARE arg1; arg1 = 3; IF (arg1<=0) PRINT "Primo argomento invalido"; ELSE DECLARE arg2; arg2 = 4; IF (arg2<=0) PRINT "Secondo argomento invalido"; ELSE WHILE (arg1!=0) arg1 -= 1; s += 1; WHILE (arg2!=0) arg2 -= 1; s += 1; PRINT s; 7

;)

__________________
"Overcome the devils with a thing called love"
Msn: crashman86@hotmail.com
Futuro programmatore grafico :)

Last edited by Crashman on 09-02-2006 at 06:42

08-02-2006 21:08
Click Here to See the Profile for Crashman Click here to Send Crashman a Private Message Find more posts by Crashman Add Crashman to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
sbrandu
.consigliere.

User info:
Registered: May 2004
Posts: 148 (0.02 al dì)
Location:
Corso:
Anno:
Time Online: 3 Days, 21:31:08: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Un aiutino Crashman tu che ce l'hai fatta per l'indentazione?

09-02-2006 10:46
Click Here to See the Profile for sbrandu Click here to Send sbrandu a Private Message Find more posts by sbrandu Add sbrandu to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 22:44.    Post New Thread    Post A Reply
Pages (3): « 1 2 [3]   Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread | Add to Bookmarks

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
 

Powered by: vBulletin v2.3.1 - Copyright ©2000 - 2002, Jelsoft Enterprises Limited
Mantained by dsy crew (email) | Collabora con noi | Segnalaci un bug | Archive | Regolamento | Licenze | Thanks | Syndacate
Pagina generata in 0.045 seconds (77.27% PHP - 22.73% MySQL) con 26 query.