Search Results

Showing results 1 to 38 of 38
Search took 0.01 seconds.
Search: Posts Made By: Infarction ; Forum: Java and child forums
Forum: Java May 4th, 2007
Replies: 3
Solved: best compiler
Views: 1,321
Posted By Infarction
I prefer to use Sun's, since they're the ones who created the language. I don't know how others compare, though.
Forum: Java Apr 1st, 2007
Replies: 7
Views: 1,249
Posted By Infarction
Ok, I'll put this bluntly: I'm not going to post any code here. You need to figure it out on your own. I gave you a list of things you need to do as well as several suggestions for how to continue...
Forum: Java Apr 1st, 2007
Replies: 7
Views: 1,249
Posted By Infarction
Number one recommendation: run your code through a compiler. There's a few really simple bugs in it. Like missing semicolons, inconsistent capitalization, and using = = instead of ==. Anyways,...
Forum: Java Mar 31st, 2007
Replies: 5
Views: 4,566
Posted By Infarction
I'm just making an assumption here, but I'd guess that you've not been on many forums. Don't take this wrong, I'm not trying to insult you, but just to help you learn a bit: capital letters should...
Forum: Java Mar 31st, 2007
Replies: 5
Views: 4,566
Posted By Infarction
I'm thinking google would be the place to look. Don't know if you'll have much luck, Oregon Trail isn't one of those games that people tend to throw together for fun. Good luck though ;)
Forum: Java Mar 31st, 2007
Replies: 7
Views: 1,249
Posted By Infarction
I certainly hope you don't expect us to write the code for you. Not only is it dishonest (we call it "cheating" around here), but there's no point. It's highly doubtful that you'll learn much if...
Forum: Java Mar 31st, 2007
Replies: 2
Solved: jav prog
Views: 703
Posted By Infarction
Not quite. The default access modifier makes things public only to the same package. Any class in another package will not be able to access the methods/members.
Forum: Java Mar 6th, 2007
Replies: 5
Views: 1,516
Posted By Infarction
Did the OP want to eliminate duplicates or summarize the number of times they occur? If the latter, jwentings solution is better (as in, mine don't keep counts :o)
Forum: Java Mar 5th, 2007
Replies: 5
Views: 1,516
Posted By Infarction
Here's two ways to do it:
1) Before you print a value, iterate over the list from beginning to that value and check if it's a duplicate. If it is, skip it. This will make your print loop run in...
Forum: Java Mar 5th, 2007
Replies: 2
Views: 2,603
Posted By Infarction
I found a fix, figured I'd post if anyone comes across the thread later. The problem was that there was a line in the frame constructor:
setMaximizedBounds(new Rectangle(0,0,0,0));
This keeps the...
Forum: Java Feb 28th, 2007
Replies: 3
Views: 4,999
Posted By Infarction
Use < rather than <=. I didn't really read the code, except for that bit.
Forum: Java Feb 28th, 2007
Replies: 2
Views: 2,603
Posted By Infarction
A project I'm working on has this awful problem wherein the JFrame refuses to resize in Linux. I've tried the setResizable(true) method, both in the constructor and outside of it, but no go. It...
Forum: Java Feb 25th, 2007
Replies: 8
Views: 1,131
Posted By Infarction
Look into the Runtime.exec methods, as masijade suggested
Forum: Java Feb 21st, 2007
Replies: 1
Views: 12,625
Posted By Infarction
I don't know if I'm right, but I think it's because you've not defined a constructor for ExeccutionStackDemo. IIRC, the default constructor in Java is something like
Classname() {
super();
}...
Forum: Java Feb 20th, 2007
Replies: 1
Views: 779
Posted By Infarction
Congratulations on copying your homework assignment. The part you copied is pretty much what you have do, except replace the arrows with = and the mod with %.

If you want more explicit help, be...
Forum: Java Feb 20th, 2007
Replies: 8
Views: 1,822
Posted By Infarction
post some relevant code please
Forum: Java Feb 20th, 2007
Replies: 8
Views: 1,364
Posted By Infarction
Yes, we can give you a hand. You'll find many members reluctant to throw in an arm with that deal unless you put in just as much. That said, post some code and explain what you've tried and how...
Forum: Java Feb 9th, 2007
Replies: 5
Views: 6,914
Posted By Infarction
Would you mind posting the solution, just for if someone reads the thread later? (And I'm remotely curious as to how to do it as well ;))
Forum: Java Feb 6th, 2007
Replies: 2
Views: 970
Posted By Infarction
^ is a bitwise XOR operator. It can only be used on primitive integer types.

?: is the ternary operator, so named because it takes three parts (see example below). It's shorthand for an if-else...
Forum: Java Feb 3rd, 2007
Replies: 5
Views: 6,914
Posted By Infarction
Just a brief look through the API (starting from JFrame's setDefaultCloseOperation()) took me to WindowListener, which might be what you're looking for.
Forum: Java Jan 31st, 2007
Replies: 2
Views: 857
Posted By Infarction
Not till you've understood the forum rules (http://www.daniweb.com/techtalkforums/announcement9-2.html)
Forum: Java Jan 31st, 2007
Replies: 5
Views: 2,138
Posted By Infarction
Perfect. I'll just suggest one change here, but it's probably something you don't need to worry about: if you have a huge array (say, something like theArray[1000][1000]) and the first item is a...
Forum: Java Jan 31st, 2007
Replies: 5
Views: 2,138
Posted By Infarction
int row = 0;
int col = 0;
for (row =0; row<theArray.length; row++)
{
for(col = 0; col<theArray[row].length; col++)
{
// no work being done here...
// you should compare...
Forum: Java Jan 30th, 2007
Replies: 2
Views: 1,865
Posted By Infarction
Look through the files for a try-catch block for an IOException and an output message matching what you've shown us. We can't really do much without seeing the code or where the error is coming...
Forum: Java Jan 24th, 2007
Replies: 1
Views: 801
Posted By Infarction
First question I have is why are you using doubles when you should probably be using ints?

Second question would be why is everything static? Static members belong to the class rather than to a...
Forum: Java Jan 23rd, 2007
Replies: 3
Views: 4,042
Posted By Infarction
You're really close again. You've got the assignment backwards for the first value (it should be a = theArray[0];). There is one other problem with your code though: it doesn't scale. What you...
Forum: Java Jan 22nd, 2007
Replies: 3
Views: 5,589
Posted By Infarction
You're definitely on the right track, but a little off. First, the array is given to you as the parameter, so you don't need to make another one. And your logic is slightly off in the if statement....
Forum: Java Dec 8th, 2006
Replies: 3
Views: 2,769
Posted By Infarction
You're changing the value of commissionRate, but there's 2 problems. First, you don't ever return this value, so any changes will be lost. Second is that you're setting the value of a single...
Forum: Java Dec 8th, 2006
Replies: 8
Views: 1,556
Posted By Infarction
Ok, I just looked over the code real quick, and one question really stands out: what does the BankAccount class have for methods? I'd assume there's going to be a getBalance() or somesuch, in which...
Forum: Java Dec 7th, 2006
Replies: 3
Views: 2,769
Posted By Infarction
I'm not seeing any logic to determine which commisions rate to hand out. Seems that it should be in getCommissionRate(), but there's nothing there. That said, what was the disallowed boolean...
Forum: Java Dec 7th, 2006
Replies: 8
Views: 1,556
Posted By Infarction
I'm guessing it would be the semi-colon at the end of the function declaration. Remove that and see if it works... though your method should be contained within curly braces {} too...
Forum: Java Sep 14th, 2006
Replies: 3
Views: 1,832
Posted By Infarction
I think the problem is in this code
for (int die = 0; die < numDiceRolled; die++) {
outcome += ( rand.nextInt(sidedDice) + 1);
...
Forum: Java Sep 14th, 2006
Replies: 5
Views: 1,549
Posted By Infarction
You could use a do-while loop. I can make two separate assumptions on how the program should work if you use that.

a) The second number should only be a single digit. Enforcing this (if you so...
Forum: Java Sep 14th, 2006
Replies: 3
Views: 1,832
Posted By Infarction
It would be nice if we knew what the problem was (saves us time figuring out where to start).
Forum: Java Sep 14th, 2006
Replies: 5
Views: 1,549
Posted By Infarction
First start out with a simple skeleton code:
class Main
{
public static void main(String [] args)
{

}
} Now, let's think about what we need to do.

We probably should prompt the...
Forum: Java Sep 12th, 2006
Replies: 6
Views: 1,633
Posted By Infarction
You can just put it in main once you've created the JFrame. It's just a call to a method, afterall ;)
Forum: Java Sep 11th, 2006
Replies: 5
Views: 1,145
Posted By Infarction
I don't remember for sure (it's been several months since I've used Java), but I thought it didn't. Could very well be wrong on that, though.
Forum: Java Sep 11th, 2006
Replies: 5
Views: 1,145
Posted By Infarction
Well, you've got a good start. Couple of tips:
a) use and tags when you post code, so that formatting is preserved. Makes your code more readable for those trying to help ;)

b)your public...
Showing results 1 to 38 of 38

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC