Search:

Type: Posts; User: SANA4SPA

Search: Search took 0.09 seconds.

  1. My program does not find the file MyFriends.txt

    import java.util.Scanner; // Needed for Scanner class
    import java.io.*; // Needed for File class

    /**
    This program reads the first line from a file.
    */

    public class...
  2. I don't understand why I get assigned value never used. line 32,33,93

    //
    /*
    * To change this license header, choose License Headers in Project Properties.
    * To change this template file, choose Tools | Templates
    * and open the template in the editor.
    */

    /**...
  3. Re: if else statement: I need to place a price in a variable: to later ad taxes and topping to final cost.

    Hello GregBrannon, I'm new to this site and as you have probably deducted already, I'm new to programming. I appreciate your guidance on the proper way to conduct myself on this site.

    I hope my...
  4. How to place the chosen pizza size in a integer variable.

    //set price and size of pizza ordered


    if (inches==10)
    System.out.println("Cost 10.99\n");

    else if (inches==12)
    System.out.println("Cost 12.99\n");

    else if (inches==14)
  5. if else statement: I need to place a price in a variable: to later ad taxes and topping to final cost.

    package lab_3;

    /**
    This program allows the user to order a pizza
    */
    import java.util.Scanner;
    //import java.text.DecimalFormat;

    public class PizzaOrder
    {
  6. Thread: If Statements

    by SANA4SPA
    Replies
    3
    Views
    965

    Re: If Statements

    3.2 Write an if statement that multiplies payRate by 1.5 If hours are greater than 40


    import java.util.Scanner;

    /*
    * To change this license header, choose License Headers in Project...
  7. Thread: If Statements

    by SANA4SPA
    Replies
    3
    Views
    965

    If Statements

    What am I doing wrong.:-/
  8. Re: Converting primitive data types to read integers with decimal

    Wow!! Thank you so much for taking the time to help me with this issue.

    For future reference, if I come across an issue in java again is there a troubleshooting method that I should employ that...
  9. Converting primitive data types to read integers with decimal

    I get an error when I try to divide 500 miles by 25.5 gallons


    Exception in thread "main" java.lang.NumberFormatException: For input string: "25.5"
    at...
Results 1 to 9 of 9