@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8



Comments:

<0> ok
<1> Jav: to sum it up: i cannot understand your code because it is written in spanish (?). and i cannot compile that code either to see what it does and how it misbehaves, because there are cl***es missing.
<1> in other words: you did not paste a test case.
<1> sorry.
<1> SAC_Admin: does the api doc page suggest a way to ***ign a value to Integer, *at* creation time or later?
<1> at the object's creation time, rather
<1> SAC_Admin: you are creating Integer objects already, don't you?
<2> im lost in docs, would be so kind as to provide a link again
<2> too many windows open :(
<1> SAC_Admin: keep these links around, you really need them.
<1> SAC_Admin: TUTINDEX Quickly locate information about your topic of interest in the *big* tutorial index: http://java.sun.com/docs/books/tutorial/reallybigindex.html
<1> SAC_Admin: APIDOCS The API documentation for the Java standard libraries ( download at http://java.sun.com/docs/ ) lists ALL cl***es (see link "All Cl***es") and ALL methods (see link "Index"): http://java.sun.com/j2se/1.5.0/docs/api/overview-summary.html
<0> is there anybody spanish?
<1> no



<2> Jav, ya a whole country of them
<1> SAC_Admin: you are creating Integer objects already, don't you?
<2> yes, when i use the get
<1> SAC_Admin: you are *creating* Integer objects already, don't you?
<1> getting is not the same as creating
<1> (in case of retrieving from a hashmap)
<2> Integer colorValue = (Integer) colorCount.get(data.colorname);
<2> thats how im creating and getting
<1> ok, so you are not creating Integer objects.
<2> okay, then im ***uming i dont have full understanding of creating them
<1> oh, wait, you probably still do.
<1> SAC_Admin: i fail to see how you can create Integer objects from a HashMap - while never creating any Integer objects. how do you do that?
<1> arf, stop, rephrase
<1> SAC_Admin: i fail to see how you can *get* Integer objects from a HashMap - while never creating any Integer objects. how do you do that?
<1> you must first *put* them there.
<2> HashMap<String, Integer> colorCount = new HashMap<String, Integer>();
<1> and when you put Integer objects into a HashMap, where do you have those Integer objects from?
<1> SAC_Admin: that is the declaration of your hashmap. it says nothing about where and how you create the stuff that you put into it, only what types you plan to put into it.
<2> Im getting first, then putting
<2> my goal is a counter
<1> SAC_Admin: a hashmap is empty at time of creation.
<2> get the value, increase by one, restore the value
<1> you cannot get anything from an empty hashmap.
<2> yes, it is empty, therefore my counter is null / zero
<2> so null plus one is one, is my logic
<2> the beginning of the counter
<1> SAC_Admin: null != 0.
<2> okay, so i need to add a checker if null set 0
<2> but then im still back at this problem, how do i increase the integer value in the map
<1> "get me the value for this name from the hashmap" "sorry sir, there isn't anything under that name enlisted here" "ok soldier, then i'll create the Integer with value 0 and put it into the hashmap".
<1> SAC_Admin: look at the api doc page of Integer.
<2> yes, clackwell i think i have an understanding about the if (map = null) {map = 0}
<1> you need to know how to create Integer objects with a given value. then you automatically know how to create Integer objects with a given value + 1.
<3> is catch executed right before the program crashes?
<3> in case of an error?
<3> I never really got it
<3> anyone knows of a good explanation about it?
<1> try it and see?
<3> not one featuring lines without explanation?
<3> Clackwell : ignored
<3> thats not an attidute of a programmer
<3> even for someone as abstract as a java programmer
<1> wow, quick to msg me :>
<1> i guess he saw it coming.
<4> the needy ones always are
<1> [18:41] <3> muslim...
<4> lol
<1> what's that supposed to mean?
<1> smells like troll ****.
<4> just leave the ban on
<4> now he's trying it again in #c#, but X is lagged as heck
<4> so my kb hasn't gone through
<1> yeah, i just noticed him going there. ;)
<4> ah, there we go. I didn't get called a muslim though
<2> okay, i see the intValue(); and getInteger();
<2> but im not grasping the getInteger(); syntax, i dont understand nm property name
<5> SAC_Admin: its a String.
<5> which is basicly all that counts here.
<5> however, if you click on the method you'll get some more verbose explenation.
<2> okay, ***uming the following: int count = 3; Integer newCount = getInteger(count); ...that doesnt work, what am i missing?



<6> SAC_Admin: never say "does not work", say what it does, what it doesn't, etc.
<6> state the errors in case you get any, etc.
<2> okay, it wont compile the page
<2> says error
<2> bad syntax i ***ume
<6> (but don't flood, rather use pastebins for pasting the complete and original error message)
<7> SAC_Admin, do yourself a favor and go read some tutorial
<5> SAC_Admin: You don't want to tackle with jsp before you learned Java.
<2> thats the error: The method intValue(Integer) is undefined for the type
<5> just write a small testcase, compile that and see what it does.
<1> SAC_Admin: see api doc page of Integer now.
<2> im looking at it
<1> SAC_Admin: does it have a method intValue(Integer) ?
<5> SAC_Admin: you're also missing a good look at the Java API. I just told you "its a String, thats all which matters". Now look what parameter you're using; "int count = 3". Naturally thats not going to work :P
<2> second, i will paste what im trying to do, i was just paraphrasing the concept
<1> what's wrong with "int count = 3;"? at least it compiles.
<5> Clackwell: nothing, but if he's using Interger.getInteger() then he'd need a String as parameter.
<1> yeah, he picked the wrong method out of the blue and tries to call it as if it was a method of his program, not Integer.
<2> Integer colorValue = getInteger(intValue((Integer) colorCount.get(data.colorName)) + 1);
<1> SAC_Admin: try not to do everything in a single line. while it sounds funny, the result is really harder to read and understand in my opinion. and there is needs to be a good excuse for writing harder to read code.
<5> anyway, you have fun here. I'm going to spend my time a little better by getting some food :)
<1> Lion-O: enjoy
<1> SAC_Admin: you are trying to use Strings now? explain why?
<2> you mean the data.colorname?
<2> data.colorName would be "red"
<2> so let me rewrite that then
<2> Integer colorValue = getInteger(intValue((Integer) colorCount.get("red")) + 1);
<1> SAC_Admin: what does the api doc say about getInteger?
<2> thats the part i dont understand, it speaks of the nm property name
<2> i dont grasp nm
<1> SAC_Admin: what does it say what data type getInteger() requires as parameter?
<1> nm is not a property.
<1> nm is the name of one of getInteger(String)'s parameters.
<1> SAC_Admin: oh, stop. i interpreted the purpose of getInteger incorrectly.
<2> okay, think your pointing out my error as using getInteger to convert int when its only made to convert string
<8> sup clacky
<2> am i getting warm?
<1> SAC_Admin: do not use getInteger, it is for something completely unrelated, namely system propertiess.
<1> hi MAlfred
<8> :)
<1> SAC_Admin: start over. write a program which declares an Integer variable, create an Integer object and ***ign that to your Integer variable.
<2> clackwell, decode?
<1> SAC_Admin: no. you have an Integer object. how do you get the value of that object as an int?
<2> intValue();
<2> but how do i turn that int back into Integer is my question
<2> or is that a step i dont have to do
<2> testing theroy....
<1> yes and now. why do you keep calling methods of specific cl***es without any prefix? how do you think should the compiler know that you mean to call intValue() on *that* specific object, esp. if you have more than just one?
<1> now=no
<1> how you call methods that are NOT implementing in your code: Cl***Name.methodName(); and variableName.methodName();
<1> that way the compiler knows which method is ment. if you leave Cl***Name and variableName away, it ***umes that methodName() must be declared in the current cl***. and of course it isn't, in your case here.
<1> meant, rather
<2> clackwell, i know you trying to make me think and learn by retorically asking me in the correct direction... but this is digging deeper and deeper into something more complex just to accomplish a simple var = var + 1;
<2> im about to pull my hair out, whats left of it
<2> i dont know JAVA at all
<2> never learned it
<2> dont understand cl***es, objects, anything
<2> so i know you are trying to help, but i really dont follow alot of what you are telling me
<1> well, that leaves only the tutorials then.
<2> is there the clifnotes? Its not productive for me to spend 10hours learning the whole lang when all i want to do is a simple counter: int myvar = 0; myvar++;
<1> one could argue that you have no business building a car if you have no idea about what that task entails.
<2> but someone else built the car for me, i just want to add cup holders
<1> of course the end result is tiny, but if you don't want to grasp it, shouldn't you rather go and pay someone to do it?
<2> :)
<2> okay, i can pay you in porn
<1> you are trying to p*** a course or something?
<2> or do you want a paypal donation?
<1> i am not willing to do it, sorry. someone else in here might though.
<2> No, im trying to add a counter to a .jsp page built by a software package i purchased
<1> that is a task of considerable depth because of the java enterprise bit which .jsp is part of, and because of the underlying design implied by that.
<2> im sorry, i dont understand all you just said.
<2> i have a .jsp page already full of loops
<2> im just trying to add a counter to one of the loops
<1> would it simply be a standalone java application it would be trivial because of lot of the complexity in the java enterprise spec. is excluded. it is this additional stuff that will raise more questions that you will pull your last hair out about.


Name:

Comments:

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






Return to #java
or
Go to some related logs:

#skype
figure.nize
WHAT CAN YOU BE A MAXIMUM OF 75 MILES FROM IN ENGLAND ?
#linux
#linux
#mysql
#skype
#linux
open a port in linux
#linux



Home  |  disclaimer  |  contact  |  submit quotes