Search:

Type: Posts; User: caiz1

Search: Search took 0.10 seconds.

  1. How do I print a double to 2 significant figures?

    In my toString I'm trying to print the total cost as $9.30. It is printing as $9.3 - without the 0 on the end.

    This looks like:


    public String toString()
    {
    return "$"+total;
    }
  2. How do I compare a variable's value with an enum's value?

    For example the context could be to see if a person can enter the club or not being underage or legal.

    In an enum class named Age:


    package test;

    public enum Age {

    Underage(0),...
  3. Replies
    4
    Views
    753

    Re: Printing Array Strings in a Method

    Currently there is no output, there is an error with this line in the CinemaApp class:
    Movie m = new Movie();

    Ideally the output should look like:


    Which movie would you like to watch?
    1 A...
  4. Replies
    4
    Views
    753

    Printing Array Strings in a Method

    Hi there, I am looking for direction on how to fix this code, as you can see I'm trying to print out the String and and enum which is stored in an array. The text however isn't printing

    This is my...
Results 1 to 4 of 4