Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Hoo read da Sthicp 2day?

Name: Anonymous 2012-04-08 22:20

AHEEE
AHEEE
AHEEE

Name: Anonymous 2012-04-08 22:26

C'MON

Name: Anonymous 2012-04-08 22:29

>>2 here
I'm trying to post a thread, but it isn't working. Something about fatal forum errors. Anyway, I have a problem. I'm new to Java, and to programming in general. I've been messing around with if statement exercises, but something's wrong.

Here's my code.

    private void calculateButtonActionPerformed(java.awt.event.ActionEvent evt) {
        int height;
        String heightText1, backText1, heartText1, resultText1;
        double convertIn;
       
        heightText1 = heightText.getText();
        convertIn = Double.parseDouble(heightText1);
        height = (int)convertIn;
        backText1 = backText.getText();
        heartText1 = heartText.getText();
        resultText1 = resultText.getText();
       
        heightText.setText(heightText1);
        backText.setText(backText1);
        heartText.setText(heartText1);
        resultText.setText(resultText1);
       
        if (height > 188) {
            resultText.setText("Sorry, it is not safe for you to ride this roller coaster.");
        } else if (height < 122) {
            resultText.setText("Sorry, it is not safe for you to ride this roller coaster.");
        } else if  (height <= 188) {
            resultText.setText("It is OK for you to ride this roller coaster. Have fun!");
        } else {
            resultText.setText("Please enter valid values.");
        }
   
        if (backText.equals "Y") {
            resultText.setText("Sorry, it is not safe for you to ride this roller coaster.");
        } else if ((backText1.equals "N") && {heartText1.equals "N")) {
            resultText.setText("It is OK for you to ride this roller coaster. Have fun!");
        } else {
            resultText.setText("Please enter valid values.");
    }

Name: Anonymous 2012-04-08 22:30

The five errors are on the last six lines except the second one).

illegal start of type

cannot find symbol
  symbol:   variable equals
  location: variable backText of type javax.swing.JTextField

')' expected

not a statement

';' expected

Name: Anonymous 2012-04-08 22:32

That was from the first line. Here's the third line, second problem.

'else' without 'if'

<identifier> expected

not a statement

';' expected


I have no clue what to do.

Name: Anonymous 2012-04-08 22:35

>Please respond

Name: Anonymous 2012-04-08 22:40

You input strings to backText and heartText. Just Y or N.
You input an int into heightText. This part already works fine.
resultText is where it answers whether or not you can ride the roller coaster. Something's wrong, though.

Name: Anonymous 2012-04-08 22:45

PLEASEPLEASEPLEASE

Name: Anonymous 2012-04-08 22:52

ANYONE

Name: Anonymous 2012-04-08 22:55

I'M TRYING TO GET IT TO REFERENCE MY TEXT BOXES, NOT ANY CLASSES

Please, I don't know what to do.

Name: Anonymous 2012-04-08 23:00

I'm honestly begging you.

I feel like such an idiot and I don't know what to do.

Name: Anonymous 2012-04-09 1:38

I done read that shit bitch ass

Name: Anonymous 2012-04-09 6:56

da lithp masheen

Name: Anonymous 2012-04-09 14:15

>>2-11
I wouldn't like to walk the kilometres of dicks you sucked.

Name: bampu pantsu 2012-05-29 4:16

bampu pantsu

Don't change these.
Name: Email:
Entire Thread Thread List