Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding
You last visited: Today at 13:57

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Java] Variable nicht erkannt

Discussion on [Java] Variable nicht erkannt within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1
 
South-Park's Avatar
 
elite*gold: 65
Join Date: Apr 2010
Posts: 2,651
Received Thanks: 509
[Java] Variable nicht erkannt

Also ich weiß nich ob ich hier richtig bin, aber wohin sonst^^

Ich spiel grad ein bissl mit Java rum und wollte einen simplen Rechner, der +,-,* und / kann. Jedoch scheiter ich schon an +^^ Ich definiere bei + eine Variable mit int, die das Ergebnis aus dem 1. und 2. Textfeld berechnet, wandel es in einen String um und mache mit setText das ding ins Ergebnisfeld rein, funzt jedoch nicht. Im Ergebnis- Feld denk ich hab ich alles richtig, obwohl NetBeans einen Fehler anzeigt, das er die Variable nich findet. Sagt mir bitte wo der Fehler is!

Hier nochmal das Projekt:
Attached Files
File Type: zip Rechner.zip (15.9 KB, 0 views)
South-Park is offline  
Old 04/13/2012, 09:37   #2
 
Z3RON3's Avatar
 
elite*gold: 31
Join Date: Jul 2009
Posts: 6,139
Received Thanks: 1,265
Quote:
Also ich weiß nich ob ich hier richtig bin, aber wohin sonst^^
Z3RON3 is offline  
Old 04/13/2012, 23:11   #3
 
elite*gold: 9
The Black Market: 156/0/0
Join Date: Apr 2009
Posts: 10,163
Received Thanks: 3,804
Arrow Technical Support -> General Coding

#moved
AllesVergeben is offline  
Old 04/14/2012, 04:00   #4


 
MrSm!th's Avatar
 
elite*gold: 7110
Join Date: Jun 2009
Posts: 28,904
Received Thanks: 25,394
Quote:
int LösungV = Integer.parseInt(Aufgabe.getText() + Integer.parseInt(Aufgabe2.getText()));
Klammern falsch.

So wäre es, wie du es willst:
Code:
int LösungV = Integer.parseInt(Aufgabe.getText()) + Integer.parseInt(Aufgabe2.getText());
MrSm!th is offline  
Reply


Similar Threads Similar Threads
regen file wird nicht erkannt/mobs spawnen nicht!
04/05/2012 - Metin2 Private Server - 14 Replies
#
Vergleich einer Variable funktioniert nicht
12/29/2011 - AutoIt - 3 Replies
Hallo, ich hab ein Problem mit dem Vergleichen eines Wertes aus einer Variable. Und zwar lese ich einen Wert aus einem Quelltext aus: $Alter = StringRegExp(BinaryToString($oWebTcp.body), 'var chevalAge = (.*?);', 1) Das funktioniert super. Doch jetzt kommt das Problem, nämlich wenn ich jetzt den Vergleich machen will: if $Alter >= "24" then Führt er die schleife trozdem aus auch wenn $Alter garnicht größer oder gleich 24 ist. Und wenn ich Elseif $Alter < "24" then funktioniert auch nicht......
psc wird nicht erkannt
12/29/2010 - Main - 3 Replies
Hallo, Meine psc wird nicht erkannt, was kann ich tun ?
Überprüfen ob Variable Eine Variable ist
10/16/2010 - AutoIt - 26 Replies
Hey leute ich wollte fragen ob/wie man überprüfen kann ob eine Variable eine Variable ist z.b. so $k = 1 $i = $k if $i = VARIABLE Then msgbox(0,'$i ist eine variable!!','') endif PS:Wp releast man nochma TuT (z.b. für metin2??)
version nicht erkannt
09/27/2010 - WoW Private Server - 2 Replies
hi der wow client sagt wenn ich mich anmelde dass die version nicht erkannt wurde aber verbindung zum derver geht kann mir da jemand helfen???:confused::confused:



All times are GMT +2. The time now is 13:57.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.