Knute Snortum

+ Follow
since Apr 20, 2013
Knute likes ...
Chrome Eclipse IDE Java Postgres Database VI Editor
After 25 years of programming, Knute has retired to be a professional musician.  Knute first learned BASIC and Cobol on a CPM Timeshare system circa 1985.  He spent way too long coding in one flavor of Business Basic or another.  Going back to college, he learned C and a whole new world opened up to him.  Knute likes Perl and Java, for completely opposite reasons.  Knute is a complex person.
Portland, Oregon
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
(keep public parts private until JForum day)
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Knute Snortum

Ammar Pehilj wrote:It kinda sucks when I have these questions torture me all day, then as soon as I send it to someone, I start noticing my dumb mistakes.

It does, but this happened not only to you, but others as well.  I think all of us have experienced something like this one or more times.
2 days ago
If you would like us to look at your complete class listings, you could create a free GitHub account and post them to a project.

Otherwise, try to create a SSCCE (that's a link) and post it here.
2 days ago

Cody Biggs wrote:Well I’m just gonna have to make it a get method and get a few points off, and see what his solution is.

You will lose points for using a getter?  That doesn't sound right.
3 days ago
Is this literally what is in the CREATE TABLE definition?  It looks like the check is "not equal to one space".  Is that what you want?
Think carefully about the logic in this line.  Will you get to the "then" part only if all fields are filled?

Also, there is a method in the String object called isEmpty().  I would use that instead of equals("").
So maybe the user can draw any number of rectangles until you press F5 or something?  How does the user signal thay that want to store this group of rectangles?
3 days ago
The other possibility is the totalShipping is declared outside of any methods and therefore is in scope in all methods.  I wouldn't recommend this, but if it is "given" then you have to work with it.
3 days ago
As with many of the posts that involve homework, I'm not sure what is "given" and cannot change, and what you can modify.  If you can modify addPackageShipping() and you want to return a value, change the method signature to return that value's type and use the return statement in your method.
3 days ago
What do you mean by "implementing" the code?  It is neither an Interface nor an abstract class.
4 days ago
You can get a free GitHub account and post the URL here, but quite honestly, if your Main class is too big to post, break it into smaller classes.
4 days ago
I'm having trouble visualizing how this multiple select rectangles would be saved as an image, as an image is only a rectangle and not a polygon.
4 days ago
Amazingly addictive game for just a few rules and a simple interface.  My wife regularly gets 4096 and 8192.
4 days ago
Since you're new to Java, here are some suggestions concerning your code:

* The formatting could be improved.  Good formatting is much more important than most beginning programmers think.
* Line 2: callClass is a bad name.  How about userData?
* Line 3: userArray() is a bad method name.  Classes should be "nouns" and methods "verbs."  Call userArray() what it does.
* Line 4: callClass.myUsers Don't access a class's fields directly.  Use a getter, which is often as simple as
* Line 4: listUsers = new ArrayList<>(callClass.myUsers); Calling ArrayList's constructor like this shouldn't be necessary.  Whatever type callClass.myUsers is, listUsers should be too.
* Line 14: if (aMyUsers != null) { Does UserData.myUsers really return a List that has null's in it?  Fix this, the remove the check for null.
You do this exact same thing at lines 8-11.  What changes in the for loop?

* Line 22: Better would be catch (Exception e){
4 days ago
In line 11 you are closing the class definition (it's even commented!) so all of the following code is outside of the class, which is not legal.  That closing brace should be after the last line.
4 days ago

Niti Kapoor wrote:...its working but not properly.

I have no idea what this means. 
4 days ago