Search:

Type: Posts; User: adnan.alvee

Search: Search took 0.16 seconds.

  1. Re: Cannot print boolean value from class!

    Norm my professor says to
    Display the object by invoking its toString method.

    How do I do that? I just displayed it using print statement but how do I do it with toString?
  2. Re: Cannot print boolean value from class!

    Some one help please!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  3. Re: Cannot print boolean value from class!

    Here is the full error message in Bold

    Public method isOn cannot be applied to given types;
    required: boolean
    found: no arguements
    reason: actual and formal arguement lists differ in length
  4. Cannot print boolean value from class!

    This is my assignment
    Write a class named Fan to model fans. The properties are speed, on, radius, and color. You need to provide the accessor methods for the properties, and the toString method...
  5. Re: Problem in Class, Displaying only one last change in value!

    Thank you soo much norm! That solved it. So static sets it to only one value change or more like the recent change in any object in other classes, right?
  6. Problem in Class, Displaying only one last change in value!

    Okay so I have a rectangle class having the default values for the rectangle'd height, width and color and area. Everything is working fine when I test them in my Test Class except the color....
  7. Re: Error: Main method not found! Please help!

    Sorry I am not getting you here. Did you find an error in my code? I have no idea what I should change in my code!
  8. Re: Error: Main method not found! Please help!

    Got it, its the same value 1.0. Tried with different initial values in height and width, findarea is good but my test class is not giving me the values I assigned in that class; all what I am getting...
  9. Re: Error: Main method not found! Please help!

    Tried this code System.out.println(findArea); error comes up saying "Cannot find symbol"
  10. Re: Error: Main method not found! Please help!

    Okay, this is my rectangle.java file code,


    public class Rectangle {
    private double width = 1;
    private double height = 1;
    private static String color = "white";

    public...
  11. Re: Error: Main method not found! Please help!

    Thanks, I know. Will change that.

    Got hold of the error, I was creating two classes in 1 file, separated the Test class. But I cannot dsiplay color and area. Output is 1.0 and 1.0 in the first two...
  12. Error: Main method not found! Please help!

    My Assignment: Write a class named Rectangle to represent rectangles. The data fields are width, height, and color. Use double for width and height, and String for color. Suppose that all the...
  13. Re: Help me with my 1st Java Assignment! Stuck!!

    I'm really confused, thought of using substring since it is mentioned in the chapter 1, but I dont know how
    this is what i got


    public class TextCHange {

    public static void main(String[]...
  14. Re: Help me with my 1st Java Assignment! Stuck!!

    I'm really confused, thought of using substring since it is mentioned in the chapter 1, but I dont know how
    this is what i got


    public class TextCHange {

    public static void...
  15. Help me with my 1st Java Assignment! Stuck!!

    My first assignment is from Savitch's book "Absolute Java". Here is the problem:

    Q: Write a program that starts with a line of text and then outputs that line of text with the first occurence of...
  16. Replies
    1
    Views
    305

    JAVA Guessing Game Problem

    Hi! I've been given a guessing game to make on some already written codes by my advisor but I'm really stuck.
    This what I was told to do and couldn't solve!
    --In this guessing game, the user...
Results 1 to 16 of 16