Search:

Type: Posts; User: acl2011

Search: Search took 0.08 seconds.

  1. Thread: error

    by acl2011
    Replies
    1
    Views
    1,243

    error

    what is wrong with my code. doesnt compile
    public class CarSimulator
    {
    public static void main(String []args)
    {
    FuelGauge amountOfFuel = new FuelGauge(0);
    Odometer currentMileage = new...
  2. Thread: Compile Errors

    by acl2011
    Replies
    3
    Views
    1,566

    Re: Complie Errors

    could you show me an example of a loop. and im a beginner java programming so i wasnt aware i had a loop inside a loop. could you help me fix this problem so i have no compile errors.
  3. Thread: Coin

    by acl2011
    Replies
    4
    Views
    2,848

    Re: Coin

    here are my compile errors

    ----jGRASP exec: javac -g Coin.java

    Coin.java:29: error: non-static method toss() cannot be referenced from a static context
    Coin.toss();
    ^
    Coin.java:30:...
  4. Thread: Compile Errors

    by acl2011
    Replies
    3
    Views
    1,566

    Compile Errors

    here is my code

    public class CarSimulator
    {
    public static void main(String []args)
    {
    FuelGauge amountOfFuel = new FuelGauge(0);
    Odometer currentMileage = new Odometer(amountOfFuel);
    ...
  5. Thread: Coin

    by acl2011
    Replies
    4
    Views
    2,848

    Re: Coin

    here is my code that i have so far. im not sure how to fix the problem
    import java.util.Random;

    public class Coin
    {
    private int sideUp;

    void Coin()
    {
    toss();
  6. Thread: Coin

    by acl2011
    Replies
    4
    Views
    2,848

    Coin

    Write a class named Coin. The Coin class should have the following field:
    · A String named sideUp. The sideUp field will hold either “heads” or “tails” indicating the side of the coin that is facing...
Results 1 to 6 of 6