First of all, I realize this is nitpicky, but it kind of matters, I highly suggest you follow Java naming conventions. Your classes should start with a capital letter (i.e. GameChat and GameLobby)....
Type: Posts; User: bgroenks96
First of all, I realize this is nitpicky, but it kind of matters, I highly suggest you follow Java naming conventions. Your classes should start with a capital letter (i.e. GameChat and GameLobby)....
Where is the data stored? Or do you have to generate it? The smartest solution is to break it down into chunks, only 1000 rows at a time perhaps.
The lazy solution (assuming your computer has...
But wouldn't it also take a lot of memory to store a hard coded array of prime numbers? Or if it was a file you would have to read the entire file each time, not to mention the size of the file....
But.... that's tedious. And we're talking every prime number up to Integer.MAX_VALUE. Not just from 2-100.
Oh and I just wanted to add I'm also self-taught with a year now of experience. Last...
No this isn't homework. Programming is a hobby/planned career of mine and I love doing it.
What I'm looking for is just randomly generating a prime number, and I would prefer not to fall back on...
It appears to me that the Sieve of Eratosthenes, while easy to implement, is not at all scalable.
If you have to create a boolean array to store all of those values in up to the limit, that begins...
I would just add the generics, if you feel it is necessary. If the Maps and Lists are all internal and still work fine, just do @SuppressWarnings and forget about it. If they are public and part of...
You don't have that right. Ever heard of something called respect?
Respect | Define Respect at Dictionary.com
Read up on it.
I agree. All I meant was that there is no use in even trying to create a Java2D game if you barely are able to create a JFrame. There will be much less frustration in writing the engine if you good...
I would recommend using a BufferedReader to read each line and then using String.split("\\s+") to separate each section. You can then evaluate the values on each line in their own respective arrays...
I would read it all in one line and then either use String.split to get each section or define explicit positions:
String bday = keyboard.nextLine();
String[] strs = bday.split("/");...
Instead of questioning the intentions and helpfulness of a valued member (and moderator) of the forums, why don't you read the damn documentation for once? The answer to all of you're problems is in...
I really don't know what you're asking. I suppose you could make a simple program that loops through counting or decrementing paint cans as they are used, kind of like the 99 bottles of beer game.
You should probably read up on the Swing and AWT libraries to learn more about managing GUI layouts and components.
For what you're trying to do, I would recommend taking a look at Box and/or...
If you only care about Windows, you can bundle it using a Windows binary executable wrapper. I use JSmooth.
If you're looking to maintain platform independence, no. You could provide the...
I would recommend getting a fully functioning Java2D (built in AWT/Swing APIs) game going before jumping into LWJGL or even JME.
If you're new to Java, and especially if you're new to programming...
I would recommend two buttons. One calls String.toUpperCase() and the other calls String.toLowerCase() on the text field's String value when pressed.
I'm having problems with some NIO test code....
I'm attempting to use a selector to choose a readable channel. The issue is, however, that the channel gets selected but reads no data. I'm...
I actually just tried installing it again... this time it didn't include an IDE and instead just came with NetBeans plugins. Now it works! Yay!
I would love to try developing for J2ME.
But I can't.
Every time I've tried to install the J2ME software on my computer... it comes up with tons of endless errors when launching modules and...
How you go about handling this task depends on what the goal is. What do you want to do with the parsed information? Write it to another file?
If you want to keep it in memory, I recommend...
You aren't helping the OP much (regardless of how simple the question is) by posting unformatted code. Nobody wants to read it. Put your code in code blocks please.
In response:
Like qurtan...
Enums do more than just hold random data.
If you need something to hold tons of data just put it in a text file.
Enums provide a way to make fields of a specific type (the enum type) and give...
3D rendering isn't simple. It requires mechanisms such as shaders, z-buffers, etc. A LOT of complicated math goes into translating 3D coordinate space points onto a 2D pixel grid.
If you want to...
If you tweak the hash codes and other values of two Objects, they are no longer duplicates. Therefore, the phrasing of the question is somewhat irrelevant and not answerable.
Sets do not allow...