Search Results

Showing results 1 to 40 of 145
Search took 0.02 seconds.
Search: Posts Made By: stephen84s ; Forum: Java and child forums
Forum: Java Aug 29th, 2009
Replies: 9
Views: 621
Posted By stephen84s
Well I can see how this can be fixed, but I need to know your motive in writing lines 4 to 17, are they for testing your code like in a main as VernonDozier says??
Also why does your sum() method...
Forum: Java Jul 25th, 2009
Replies: 3
Views: 660
Posted By stephen84s
Now I haven't gone through your code, but if you are looking for a data structure which can hold a list and gives you the facility to delete any element at random I suggest you take a look at the...
Forum: Java Jul 25th, 2009
Replies: 6
Solved: Javac Problem
Views: 367
Posted By stephen84s
@ryy705
Now when I run javac -help I get the following message:-


Although I use the Eclipse Java compiler, but then too the usage should be the same even with the Sun JDK.
Now if you notice...
Forum: Java Jun 9th, 2009
Replies: 9
Views: 337
Posted By stephen84s
Hi James, you have to use the noparse tags around the code tags like this:-
Forum: Java Jun 9th, 2009
Replies: 7
Views: 1,133
Posted By stephen84s
I agree with VernonDozier, your code compiled and ran OK,
You should not be getting this problem unless and until you are using a Java compiler prior to release 1.2 (i.e a pre Java2 compiler cause...
Forum: Java Jun 9th, 2009
Replies: 11
Views: 539
Posted By stephen84s
No problems, with the line numbers, I appreciate the fact that even though new you even care to use code tags.
The line numbers will come up if you wrap you code inside and tags.

Anyways the...
Forum: Java Jun 9th, 2009
Replies: 11
Views: 539
Posted By stephen84s
Can you point out which is the line specified here :-


at MyPackage.MouseOverExample$Glyph.<init>(MouseOverExample.java:109)
Forum: Java Jun 9th, 2009
Replies: 9
Views: 337
Posted By stephen84s
@lloydsbackyard

I dont know what you are talking about. When I ran your code, it worked perfectly:-


stephen@xxx:~/Development/java> javac bonus.java
stephen@xxx:~/Development/java> java...
Forum: Java May 30th, 2009
Replies: 4
Views: 354
Posted By stephen84s
Well just a quick Search of your code revealed that you have never created an Object of ExtendDVD so I guess its logical that nothing from it would be printed.
Forum: Java Apr 21st, 2009
Replies: 2
Views: 233
Posted By stephen84s
Its as simple as :-

String[] splitString = book[i].split("-");

Look here (http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html#split(java.lang.String)) for more details.

But beware...
Forum: Java Mar 19th, 2009
Replies: 6
Solved: Learning Swing
Views: 557
Posted By stephen84s
I cannot see a main() method in the code that you have posted, also you have not made your JFrame ([URL="http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JFrame.html) visible using the...
Forum: Java Mar 19th, 2009
Replies: 4
Views: 318
Posted By stephen84s
Would you care to mention what does your Hashtable contain or do I have to find that out from my crystal ball.
Forum: Java Mar 17th, 2009
Replies: 11
Views: 1,243
Posted By stephen84s
Now referring to your import statements (Although jasimp has already given you the solution for finding the classes you made with "importing" them).
You import the classes and not the .java files,...
Forum: Java Mar 16th, 2009
Replies: 2
Views: 512
Posted By stephen84s
This has gotten me confused, is the second part not contradicting the first ???
Forum: Java Feb 27th, 2009
Replies: 30
Views: 3,333
Posted By stephen84s
I was assuming that is some mistake my the O.P. cause that "split()" method of python too does not operate in that manner but I could be wrong.
Thats the reason why instead of using his first post I...
Forum: Java Feb 27th, 2009
Replies: 30
Views: 3,333
Posted By stephen84s
In Java too its just the same thing :-


String alpha = "A B C 1 2 3";
String beta[] = alpha.split(" ");


The values is "beta" would be the following :-

beta[0]="A"
Forum: Java Feb 23rd, 2009
Replies: 13
Views: 745
Posted By stephen84s
Ehh !!! Its your program you tell me what you wanted to be printed instead of "null" !!!
Forum: Java Feb 23rd, 2009
Replies: 13
Views: 745
Posted By stephen84s
If you carefully check the following piece of code :-


String output = null;
String menu = null;
Scanner keyboard = new Scanner (System.in);
System.out.print("\nEnter your taxable income...
Forum: Java Feb 23rd, 2009
Replies: 13
Views: 745
Posted By stephen84s
String myString = Integer.toString(enter);

return enter;
return output;


You completely missed the point I was trying to say. I had told you to package both those values into a String...
Forum: Java Feb 22nd, 2009
Replies: 13
Views: 745
Posted By stephen84s
Forum: Java Feb 22nd, 2009
Replies: 13
Views: 745
Posted By stephen84s
You have many options here one is create a new class which has those two as its member properties and return a reference to this object from that method.
Second is put them both inside a "String"...
Forum: Java Feb 19th, 2009
Replies: 4
Views: 1,356
Posted By stephen84s
If you use the showInputDialog() (http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JOptionPane.html#showInputDialog(java.awt.Component,%20java.lang.Object)) method, it either returns the String...
Forum: Java Feb 19th, 2009
Replies: 4
Views: 1,356
Posted By stephen84s
In case you do not want your user to press "Cancel" in a JOptionPane dialog, you can actually get rid of that button altogether using the JOptionPane.showOptionDialog()...
Forum: Java Feb 19th, 2009
Replies: 1
Views: 502
Posted By stephen84s
From what I see, unlike the rest of the variables (mass, diameter and names which are all arrays) surfaceGravity is just a normal variable.

Hence the following for loop:-


for (int y = 0; y <...
Forum: Java Feb 16th, 2009
Replies: 4
Solved: number limit
Views: 877
Posted By stephen84s
Yeah thats correct, but I assumed the thread starter will figure out what additional checks to put, so I just pointed out where to put his checks.
Forum: Java Feb 16th, 2009
Replies: 4
Solved: number limit
Views: 877
Posted By stephen84s
The following loop itself could be modified to perform this check you need :-

do {
System.out.print("\nHow many adult tickets? ");
atickets = keyboard.nextInt( );
System.out.print("How...
Forum: Java Feb 14th, 2009
Replies: 17
Views: 1,988
Posted By stephen84s
Since you are already getting an exception, can you print out the exact StackTrace of what is being thrown up at you.

java.lang.NullPointerExceptions occur when you are trying to invoke a...
Forum: Java Feb 14th, 2009
Replies: 17
Views: 1,988
Posted By stephen84s
java -jar "/home/viber/JAVAFINAL/dist/JAVAFINAL.jar"

Now I see the reason for the problem. I am guessing your username is "viber" on your computer and you are running this application is user...
Forum: Java Feb 14th, 2009
Replies: 17
Views: 1,988
Posted By stephen84s
Show me some code, on how you are creating your file, also the exact command how you are executing your jar file.
Forum: Java Feb 14th, 2009
Replies: 17
Views: 1,988
Posted By stephen84s
Define what you mean by "can it doesn't work".

Do you have any errors or exception StackTraces to help us go on ?
Forum: Java Feb 13th, 2009
Replies: 4
Views: 808
Posted By stephen84s
Try System.out.printf (http://www.particle.kth.se/~lindsey/JavaCourse/Book/Part1/Tech/Chapter05/formatterPrintf.html).
Forum: Java Feb 12th, 2009
Replies: 8
Views: 687
Posted By stephen84s
Do not be so judgmental, If you hang around here long enough you will see your fair share of them.
Forum: Java Feb 12th, 2009
Replies: 5
Views: 273
Posted By stephen84s
Thats what I meant by try it. Trust yourself a little and take the jump. At most you will get a compile error or a wrong output, the world will not end with that.
The help offered here is more like...
Forum: Java Feb 12th, 2009
Replies: 5
Views: 273
Posted By stephen84s
Yes, Next time you post wrap your code inside
and tags. Also what do you need help for ? Tell us the problem (compile errors,logic problems etc etc) you are facing and this time please do not give...
Forum: Java Feb 11th, 2009
Replies: 5
Views: 921
Posted By stephen84s
Eeep !!! Sorry Confused myself on that one, heres what I think is going wrong.
Now I just went through your code the problem seems to be a tad more deeper than I thought.

You see at the class...
Forum: Java Feb 11th, 2009
Replies: 5
Views: 921
Posted By stephen84s
But the condition in your do-while loop is

while(allocated < c)


So definitely it wouldn't stop because technically "allocated" is not less than "c".

If you want it to terminate when...
Forum: Java Feb 11th, 2009
Replies: 11
Solved: For loop
Views: 654
Posted By stephen84s
Yes NightStrider, we do all start with such trivialities but the fact that makes us what we are is "What we do about them".

Putting myself in his shoes, I wouldn't have been on a public forum...
Forum: Java Feb 11th, 2009
Replies: 2
Solved: Help Needed
Views: 252
Posted By stephen84s
If you are using a Swing Form to get Input then I would suggest dropping the while loop altogether because your actionPerformed() method will be called whenever your user clicks on the GuessButton...
Forum: Java Feb 10th, 2009
Replies: 11
Solved: For loop
Views: 654
Posted By stephen84s
You can start here (http://java.sun.com/docs/books/tutorial/java/nutsandbolts/for.html).
Forum: Java Feb 8th, 2009
Replies: 5
Views: 1,547
Posted By stephen84s
First of all you will need an API (provided by one of various currency exchange websites) which will feed you the data if you want live /real time exchange rates.
I normally use www.xe.com to check...
Showing results 1 to 40 of 145

 


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

©2003 - 2009 DaniWeb® LLC