|
It's likely that this is under my nose and I'm an idiot, but am I able to download the whole java API documentation so that I can reference it sans internet? In a simple way? (javadocs.zip?) I mean this website: http://docs.oracle.com/javase/6/docs/api/java/util/ArrayList.html
|
# ? Feb 29, 2012 14:22 |
|
|
# ? Jun 13, 2024 04:36 |
|
Newf posted:It's likely that this is under my nose and I'm an idiot, but am I able to download the whole java API documentation so that I can reference it sans internet? In a simple way? (javadocs.zip?) It's not directly linked from the online API docs, but you can find the link on the Downloads page way down under Additional Resources.
|
# ? Feb 29, 2012 14:31 |
|
Here is the download for the Java7 javadocs.
|
# ? Feb 29, 2012 14:32 |
|
Thanks!
|
# ? Feb 29, 2012 14:53 |
|
Sinestro posted:I am a Python programmer, and I need to learn semi-basic Java. All the books I see online are really old, designed for people that have no idea how to program, and/or designed for people who are already know Java to hone their skills. What do you mean by basic? Core Java is a pretty good place to go if you want something that will get you up to speed. Just skip the parts you don't need.
|
# ? Feb 29, 2012 19:32 |
|
Lets say I have a do-while loop:code:
To clarify I only need help with setting a range on n. The actual script compiles and works but I cannot find a way to stop n from being too high/low. RADmadness fucked around with this message at 18:02 on Mar 2, 2012 |
# ? Mar 2, 2012 17:56 |
|
ew, do-while 1 <= n && n <= 5, assuming you're being inclusive
|
# ? Mar 2, 2012 18:02 |
|
We gotta start somewhere, this is week 6 of my java course. But thanks for the help.
|
# ? Mar 2, 2012 18:07 |
RADmadness posted:We gotta start somewhere, this is week 6 of my java course. But thanks for the help. php:<? for (int i=0;i<5;i++) { System.out.println(i); } ?>
|
|
# ? Mar 2, 2012 19:03 |
|
Is do-while ever useful?
|
# ? Mar 3, 2012 00:22 |
|
Tots posted:Is do-while ever useful? Its purpose is to have a block of code that is always executed at least once, then repeated if necessary. So, it's useful in those situations. It's also usually (always?) possible to do the same thing with a while or for loop. It's just a style preference.
|
# ? Mar 3, 2012 00:29 |
|
Mobius posted:It's also usually (always?) possible to do the same thing with a while or for loop. Always. You can trivially transform any do/while into a simple while. code:
code:
|
# ? Mar 3, 2012 00:35 |
|
No Safe Word posted:
I think you meant: code:
|
# ? Mar 3, 2012 01:19 |
I prefer:php:<? boolean done = false; while (!done) { //do loop stuff if (something) done = true; } ?>
|
|
# ? Mar 3, 2012 01:24 |
|
fletcher posted:I prefer: I've coded a total of about 2 things so far, and this is what I've used.
|
# ? Mar 3, 2012 02:02 |
|
Tots posted:Is do-while ever useful? I've used it once ever in real code. Usually I just use a while loop with a flag already mentioned. Still something you should learn
|
# ? Mar 3, 2012 02:07 |
|
aleph1 posted:I think you meant: I think you mean: code:
|
# ? Mar 3, 2012 02:09 |
|
Jabor posted:I think you mean: Yes, this is what I meant
|
# ? Mar 3, 2012 03:25 |
|
I'm almost afraid to ask (since I happily use them, if not often) - is there an good reason to avoid do/while loops?
|
# ? Mar 3, 2012 11:41 |
|
Computer viking posted:I'm almost afraid to ask (since I happily use them, if not often) - is there an good reason to avoid do/while loops? I don't think so. I think the issue that people take with them is that if you sufficiently understand while loops then they are unnecessary. If you like using them then I don't see any reason why you shouldn't use them. Of course I'm new to the game so I could be very wrong, but that's how it looks to me.
|
# ? Mar 3, 2012 15:11 |
|
Computer viking posted:I'm almost afraid to ask (since I happily use them, if not often) - is there an good reason to avoid do/while loops? No. If a do-while gives you the behavior you want then by all means use it. It also has the benefit of semantic clarity that it will run at least once without the reader needing to evaluate the initial conditions, as well as generates bytecode that is more sexy (to a compiler geek). awkward while bytecode: code:
code:
|
# ? Mar 3, 2012 16:59 |
|
Book recommendation? I don't want to sludge through 122 pages and there isn't one in the OP/first page. I have some creaky old 'Learning Java' from 10 years ago but I'll just buy something new. I know C and Ruby (and did -some- basic Java a long, long time ago) so I don't need anything geared toward complete beginners. Strangely enough there are only a few Java books at the local Barnes and Noble for me to look through and they are all 4 years old, and there are so many books on Amazon I don't know which to begin looking through.
|
# ? Mar 4, 2012 04:53 |
|
Bob Morales posted:Book recommendation? I don't want to sludge through 122 pages and there isn't one in the OP/first page. http://www.deitel.com/Books/Java/JavaHowtoProgram7e/tabid/1191/Default.aspx I know there's some mixed feelings but I've gone through 2 editions of this book and if you like looking up a topic and seeing code examples EVERYWHERE as well as detailed explanations as to what's going on, then this is the book for you. The latest editions took away those stupid rear end covers with bugs doing dumb poo poo, but I kinda liked them.
|
# ? Mar 4, 2012 05:45 |
|
Bob Morales posted:Book recommendation? I don't want to sludge through 122 pages and there isn't one in the OP/first page. I'm using Horstmann's Big Java for a class right now and finding it pretty helpful and thorough. Expensive though.
|
# ? Mar 4, 2012 08:22 |
|
poemdexter posted:http://www.deitel.com/Books/Java/JavaHowtoProgram7e/tabid/1191/Default.aspx Been working through the nineth edition with my class. I really like it. Its got quite a few exercises at the end that really pound concepts into you.
|
# ? Mar 6, 2012 04:47 |
code:
|
|
# ? Mar 7, 2012 23:29 |
|
fletcher posted:
Is it always "value XX"? If so, consider just using a list of Integers and transforming the output elsewhere. Then the sort will work fine. Otherwise, you'll have to write a custom comparator to pass into Collections.sort or just write your own sort (which would be kind of silly).
|
# ? Mar 8, 2012 00:00 |
|
fletcher posted:
Either make the list an Integer type and add the value part later or write your own comparer
|
# ? Mar 8, 2012 00:45 |
|
fletcher posted:
Well... When you are doing something like this you could just change the code to... code:
|
# ? Mar 8, 2012 00:46 |
No Safe Word posted:Is it always "value XX"? If so, consider just using a list of Integers and transforming the output elsewhere. Then the sort will work fine. Nope, it's not always "value XX". I'll go with the custom comparator.
|
|
# ? Mar 8, 2012 01:13 |
|
Am I creating an array of objects incorrectly, or something?code:
code:
edit; I figured out my problem! I needed to add code:
Sab669 fucked around with this message at 04:12 on Mar 8, 2012 |
# ? Mar 8, 2012 04:02 |
|
I very nearly posted the stupidest question in the history of the thread but I've just figured it out. Now I have to post it anyway because I've had a good laugh at the situation and I'm on a real streak of INCREDIBLY DUMB programming errors (an hour where corresponding files weren't in the same directory, an hour shouting at a program that wouldn't run because it didn't have a main method, and now this): Me, last night posted:Why won't eclipse auto-import this? Even trying the imports manually I can't get it to work??? Does day-to-day programming ever get over this kind of boneheadedness? I'm sure that I spend half of my 'coding time' on these types of errors.
|
# ? Mar 9, 2012 14:02 |
|
Newf posted:I very nearly posted the stupidest question in the history of the thread but I've just figured it out. Usually the solution is to stop using eclipse.
|
# ? Mar 9, 2012 15:54 |
|
Newf posted:Does day-to-day programming ever get over this kind of boneheadedness? I'm sure that I spend half of my 'coding time' on these types of errors. Yes and no. They will become less frequent but there will always be times when something obvious becomes incredibly difficult due to either being tired, a cache bug, or something else miniscule that will cost you a couple of hours.
|
# ? Mar 9, 2012 15:59 |
|
TRex EaterofCars posted:Usually the solution is to stop using eclipse. Having only used NetBeans besides, what's wrong with Eclipse? We're stuck with Rational Application Developer (which is always a few versions behind on the Eclipse framework) because of the need for the Websphere runtime.
|
# ? Mar 9, 2012 16:03 |
|
Nothing is wrong with Eclipse. Some people just don't like certain IDEs.
|
# ? Mar 9, 2012 16:36 |
|
Eclipse is a decent program bogged down by half implemented and bug ridden plugins, overly aggressive caching and a horrible UI. Intellij is better for nearly every professional level development task.
|
# ? Mar 9, 2012 16:40 |
|
TRex EaterofCars posted:Usually the solution is to stop using eclipse. But I just started last night! AHHHHHH!
|
# ? Mar 9, 2012 16:57 |
|
Eclipse is fine, people just get defensive about IDEs. Having used all 3 I still stick with Eclipse. It is also helpful when on a team because they are most likely also using Eclipse.
|
# ? Mar 9, 2012 17:20 |
|
|
# ? Jun 13, 2024 04:36 |
|
It's true that on a team Eclipse is usually the lowest common denominator, but it really is a really bad program. I've tried very hard to not hate it and sound like some "emacs vs vi" grade zealot, so I used it daily for it for like 7 years. It simply has not given me any indication that quality is a development priority.
|
# ? Mar 9, 2012 17:30 |