@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3



Comments:

<0> I ***ume making a clone()-function with return this; won't do it?
<0> inside the cl***..
<1> what's the point then ?
<2> Athox: calling clone(), if it's implemented is typically the right way, yes
<0> where do i find the clone stuff then
<2> Athox: you mean cloning yourself?
<3> wlfshmn: There is something called clone already, see Object.clone(). However, it's not very well designed.
<2> rickety: I know this, but depending on the object, it may or may not be what you want
<3> wlfshmn: I meant to say that to Athox.
<0> I
<0> 'll check it out and get back to you
<0> :P
<4> Hey... I have an hirerchy issue,
<4> I know this is solvable but I forgot how
<4> maby someone can help me...
<5> ?



<4> I have an abstract cl*** A which has an "int value=0" and implements a method getVal(){return value}. A is inherited by cl*** B, which "overrides" "value", and initializes it to some value. now, calling "B obj= new B(); obj.getVal()" returns 0 rather than what is held in B.
<4> I need it to return the value in B
<5> sec
<4> you want me to paste code?
<5> No I understand the problem
<5> No pasting in channel please ;)
<4> k... 10x
<4> I know... I read the title :) there's this site for pasting.. ;]
<3> Niver: cl*** A { int value=0; } cl*** B extends A { int value=5; } B b=new B(); A a=b; System.out.println(a.value+","+b.value);
<4> rickety: not exactly...
<5> Overriding the value doesn't work
<3> Niver: So? The problem's caused by the same thing.
<4> cl*** A { int value=0; public int getVal() {return value} } cl*** B extends A { int value=5; } B b=new B(); A a=b; System.out.println(a.getVal()+","+b.getVal());
<4> yes, probably...
<5> You're better off doing something like... cl*** B extends A { public B() { value = 5; }
<4> Resonator: Same result
<3> Niver: pastebin
<4> no! not same result!
<4> Damn... what did I miss before?!
<4> well, thanks anyhow :)
<4> for a reason I thought this didn't work before....
<5> Overriding a member variable doesn't work in the same way as overriding a method
<3> Niver: There's no reason to extend cl***es, unless they're designed for extension, and there's no reason to design for extension.
<6> Resonator: mind a quick notice?
<5> Rather than defining the value of the variable inline, do so in the constructor. That way you can set an explicit value with different subcl***es.
<5> Lion-O: notice?
<6> Resonator: or /msg :)
<5> not at all
<7> Hello
<7> i need little help please,anyone available?
<5> ?
<8> salam
<3> salad sandwich
<7> grade[i]=a.readLine(); its tell me incompatible types found. required:int im lost,can anyone help
<7> i deifned grade an integer
<7> *as
<3> KingRaptor-: What type is grade?
<5> What type is "a"?
<7> grade is integer
<3> No such type: integer
<7> buffered reader
<7> im using buffered reader
<3> grade is not integer
<5> readLine() returns a string, not an integer.
<7> woops,i need to parse right?
<5> You're going to have to convert the input line to an int before storing it in the array.
<5> Exactly ;)
<7> oh thanks
<7> ill try it :)
<5> Integer.parseInt(a.readLine())
<7> thx
<5> np
<7> same probme exists,hmm dunno why
<9> hey :) This concerns java3D.. I have a simple path (array of Point3f) and a box moving around this path using PositionPathInterpolator. This works fine. Howevever, what is the easiest/best way for me to ROTATE the box 90 degrees CCW at each point in the path ?
<3> KingRaptor-: What type is grade?
<3> KingRaptor-: integer grade; ?
<7> yes
<7> array of type integer :
<7> the problem is still persists even after parsing
<7> int grade[]=new int[4]; i guess i dont have syntax error here



<3> int[] grade=new int[4]; is recommended for clarity.
<3> The type of grade is int[].
<3> Or int array.
<3> So you have an int on the left. grade[i] is an int.
<3> And on the right, what do you have now?
<3> grade[i]=what>
<3> ?
<7> int grade[]=new int[4];
<7> oh wait
<3> bang
<7> grade[i]=a.readLine();
<7> and parsing after that
<5> grade[i] = Integer.parseInt(a.readLine()); <- try that
<7> k
<3> KingRaptor-: What type does readLine return?
<5> You can't ***ign grade[i] (an int) to the return value of a.readLine() (a *String*)
<3> Resonator: Almost, you got the order in the wrong words.
<7> wohoooooooooo
<7> anyway it worked
<5> rickety: huh?
<3> Resonator: You can't ***ign the value of a.readLine() to grade[i].
<7> why rickety?
<10> ask the question again, rick.
<3> KingRaptor-: Because the types are incompatible.
<7> aha
<3> KingRaptor-: What type does readLine return?
<10> mayb ehe'll read it this time, and try to find the answer to it, too.
<7> String
<7> and grade is int
<3> grade isn't int, we've already been through that.
<10> sooksess!
<10> well, partial.
<7> array
<3> int array, yes.
<7> the program is running thx
<3> Clackwell: Moin.
<10> hi rick :)
<8> salam
<3> salami
<10> salam alaikum
<8> thks
<9> no java3d-heads here then? ;)
<8> :)
<3> Antrix: Do you really think they'd use actual text for chat?
<3> They send each other 3D objects.
<9> haha
<9> :'(
<3> I got banned for sending a 3D scanned pair of fingers making a V shape. What's that about?
<9> do they copy the raw cl*** data into a byte array then? and send that over socket? :(
<9> not in the mood lol :(
<9> right now my little racing car is moving sideways down the racing course :( i shouldnt be allowed to do anything in 3D
<5> That could be bad for the suspension!
<9> i thought so to, but it's quite happily doing it... must have coded the driver's skills on par with my own. (YES, i can drive sideways without stressing the suspension)
<9> Driver d = new Driver("AntriX", madskills); Car c = new Car(d);
<9> er.. but on a serious note; anyone that can help me out?
<3> Help you out? To get out, you type /quit
<9> :p
<9> err i mean hit
<9> what's wrong with 2D anyways :(
<3> Clackwell: How's teh ##java doing?
<9> any of you played around with C# at all ?
<3> I've ridiculed it.
<9> :o
<9> is it **** ?
<10> rickety: more and more hard core beginners showing up, most of them very resistent to suggestions, subtle hints, etc.
<10> kind of like in here all the time.
<10> rickety: why aren't you over there anyway?
<3> Annual leave.
<3> I got a bit pissed off with cheeser and pr3d4t0r.
<3> I'll be back tomorrow, it'll have been a month then.
<10> rickety: ah. i never understood the reservations about you. the channel hasn't gotten any better since your leave. i seem to recall that *someone* had it in his head that you are in part responsible for the decline of ##java's niveau. (and that someone was neither cheeser nor pred.)
<3> Clackwell: That person is waz, who is an op on efnet #java, where I'm hanging around. I think we've resolved our differences.


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #java
or
Go to some related logs:

equium 2000 startx
#linux
Zejza
boccu
#linux
#AllNiteCafe
#javascript
ghjkkkkk
#teens
nicknameuri



Home  |  disclaimer  |  contact  |  submit quotes