Peter Taucher wrote:
Ana Suvari wrote:The behaviour is C++ Iterators and Vectors. That should be a Java version of the first code I posted at the top.
And what exactly does the first (C++) code do? I haven't coded C++ since about seven or eight years, so please enlighten me...
Peter Taucher wrote:First of all you're in a Java forum. So maybe it would be a nice idea instead of posting C++ code to describe what behaviour you want to achieve with your code. And then it's always a good approach to use the API classes, like java.util.Vector.
An last but not least 'I get compiler errors' is only nice in liaison with a crystabl ball. Otherwise we need you to TellTheDetails.
Christophe Verré wrote:Why are you declaring T as <Integer extends Comparable> ? This hides the Integer class, and you're not using it anywhere. Remove it if you don't need it.
Christophe Verré wrote:
I originally had it without the "new" operator but I had the same error
Really ? Can you try again, and copy/paste the line which gives you that same error ?
Henry Wong wrote:
Ana Suvari wrote:
Integer intResult = new Integer.parseInt(result); //error: cannot make static reference to non-static Integer
This is not a valid Java statement... When you use the new operator, it is expecting the class name and constructor parameters. And when you try to call a static method, it is not expecting the new operator to be used. There is no such a thing a trying to instantiate a call to a static method.
Henry
Ana Suvari wrote:I don't understand what to do...The window class is the super class that calls creates an instance of JoinRoom. I can't just make the subclass called inside window as another parameter to the Controller. It doesn't make sense too. I need to make Window class know about it so then Controller will know about it.
public RoseRealTimeController(RoseRealTimeWindow window, JoinRoom jroom, String hostname, int portnumber)
Please help me someone. I'm really strugglinig I'm supposed to be working with my team but they abandoned me.
I'm in trouble if i can't figure it out.