yeah, I can do that, but if I do that,
char stackContent shows me error,
char stackContent;
stackContent = theStack.pop();
how can i put whatever is in pop which is...
Type: Posts; User: adnan.alvee
yeah, I can do that, but if I do that,
char stackContent shows me error,
char stackContent;
stackContent = theStack.pop();
how can i put whatever is in pop which is...
Aint I close? I jst need the return statement to work below, tried casting charElement into return entry since it is char type !, nope doesn't work! But the code makes sense?
public char pop()...
Here is my code, all the classes are in here, you can skip stackexception and strelement(does nothing - to be deleted) classes: https://compilr.com/xemkruz/linkedstach/LinkedStack.java
How can i...
This what I did, it says incomaptible data types, the real questions is how do I convert? I do have a getCopy method in my char element class. So far thw wrong code is below,
public char pop()...
should the code save what is returned by the pop() method?
Yes, it should save whatever its taking off, at least that is what I'm guessing because see on my tester below, I want to store whatever it...
I have LinkedStack class, what I simply want to do is make a delimiter match alogorithm, I also have the working algorithm for it but the problem is implementing the algorithm . I'm just stuck in my...
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?
Some one help please!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
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
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...
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?
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....
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!
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...
Tried this code System.out.println(findArea); error comes up saying "Cannot find symbol"
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...
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...
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...
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[]...
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...
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...
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...