Search Results

Showing results 1 to 40 of 92
Search took 0.02 seconds.
Search: Posts Made By: javaAddict
Forum: Java 4 Days Ago
Replies: 8
Views: 246
Posted By javaAddict
After taking a closer look at the code you don't need the casting. Since you read from the file a Music object, it doesn't matter what type of music it is:


while (true) {
Music music =...
Forum: Java 4 Days Ago
Replies: 8
Views: 246
Posted By javaAddict
Even though from your code you have figured out on your own how to use array of objects here is a small example:

Music [] array = new Music[3]; // array is an array and it is not null

// Its...
Forum: Java 9 Days Ago
Replies: 4
Solved: Error in Java
Views: 212
Posted By javaAddict
You can make the method static. Like the main.
Forum: Java 10 Days Ago
Replies: 7
Views: 243
Posted By javaAddict
After searching for examples on the net, I found this:
Assuming your file is like this:

And you run this:

RandomAccessFile raf = new RandomAccessFile("fileName","rw");
...
Forum: Java 10 Days Ago
Replies: 7
Views: 243
Posted By javaAddict
I think that the RandomAccessFile (http://java.sun.com/j2se/1.5.0/docs/api/java/io/RandomAccessFile.html) might help you.
Forum: Java 12 Days Ago
Replies: 1
Views: 154
Posted By javaAddict
I would have used the sleep method:

// line read:
line = readLine();

// take the time at the end of the line:
lone time = ... ;

try {
Thread.sleep(time);
Forum: Java 13 Days Ago
Replies: 7
Views: 303
Posted By javaAddict
Because you only have ONE tempPerson object. You have the same instance of it:



tempPerson.setPerson(tempName, tempAddress, tempBirthDate);

System.out.println(tempPerson.getLastName()); //...
Forum: Java 13 Days Ago
Replies: 4
Views: 201
Posted By javaAddict
It will work, but don't forget that each element of the iterator will have one of these:
java.util.Map.Entry (http://java.sun.com/j2se/1.4.2/docs/api/java/util/Map.Entry.html)
Forum: Java 13 Days Ago
Replies: 7
Views: 260
Posted By javaAddict
Try run it without the .class extension:
> java Hi

Then post the error that you will get :)
Forum: Java 13 Days Ago
Replies: 16
Solved: Append to array
Views: 577
Posted By javaAddict
You need to use java.util.Date, not java.sql.Date.
Forum: Java 16 Days Ago
Replies: 3
Views: 208
Posted By javaAddict
You aren't making any sense
Forum: JSP 24 Days Ago
Replies: 9
Views: 634
Posted By javaAddict
It is like I said. You lack the very basics and you should be ready to accept criticism:

Java is executed at the server. Then the page is generated and then send to the client pure html.
...
Forum: JSP 25 Days Ago
Replies: 5
Views: 331
Posted By javaAddict
Here is how:
1) Post to correct forum
2) Be more descriptive on your problem
3) Show some effort

If you are talking about a web application

4) Learn about request, session
5) Learn about...
Forum: Java 26 Days Ago
Replies: 2
Views: 163
Posted By javaAddict
At the validation I believe that the seconds should until 59. For the hours you 23, 59. Why not the same for seconds.

For the extract when you multiply and then do a mod, you will get 0.

123 *...
Forum: Java 26 Days Ago
Replies: 4
Views: 252
Posted By javaAddict
Your first code will not compile and it is not java (elif)

The second is totally inefficient and shows no thinking at all to the real problem
Forum: JSP 26 Days Ago
Replies: 1
Views: 416
Posted By javaAddict
Why don't you use the post method?
Forum: JSP 28 Days Ago
Replies: 8
Views: 58,790
Posted By javaAddict
And what is the point of this post? This is a 4 year old thread which has been revived 1 year ago, with no useful information. Can someone please close this?
Forum: Java 28 Days Ago
Replies: 21
Views: 641
Posted By javaAddict
Actually I understood that the objective was to monitor how many times a word appeared.
I would suggest sth like this:

String word;
Vector linesAppeared;

And the size of the vector would be...
Forum: Java 34 Days Ago
Replies: 4
Views: 245
Posted By javaAddict
Was the assignment given to you today? If no, then what were you doing all this time? If yes, then you have a very demanding teacher.



Does this mean that next time you will do it on your...
Forum: DaniWeb Community Feedback Oct 25th, 2009
Replies: 43
Views: 4,759
Posted By javaAddict
Well as VernonDozier said, shouldn't you at least be able to mention the reasons why you Up or Down voted a post, or be able to see who did it to your post?
Forum: DaniWeb Community Feedback Oct 24th, 2009
Replies: 43
Views: 4,759
Posted By javaAddict
So from what I understood:
The reputation system affects both the rep points as well as the voting points of the specific post,
but
The voting system affects only the voting points?

Also is it...
Forum: Java Oct 23rd, 2009
Replies: 19
Views: 1,130
Posted By javaAddict
I haven't look at your code but from your explanation, I assume that you create the second frame, when the button is clicked?
If yes declare the second frame as global variable and create it once....
Forum: Java Oct 23rd, 2009
Replies: 6
Solved: arrays
Views: 267
Posted By javaAddict
public static float average(short [] grades) {
// calculate the average using a for loop
}


And to call it after you have your array created and entered values in it:

short [] grades =...
Forum: Java Oct 17th, 2009
Replies: 6
Views: 314
Posted By javaAddict
I don't think it's possible. Whenever you type something it is stored in the variable, therefor you need an if statement, but I would suggest to wait for other people responses as well in case...
Forum: Java Oct 16th, 2009
Replies: 3
Views: 316
Posted By javaAddict
Sorry for my double post but when you are done with your solution, there is a much smarter - but more difficult - way you can try:

String [] words = {"Alpha", "Bravo", ....};


Now when you get...
Forum: JSP Oct 13th, 2009
Replies: 1
Views: 496
Posted By javaAddict
Have you tried using another attribute than "disabled".
The input "text" has an attribute "readonly". Search what other attributes the checkbox has.
Forum: Java Oct 13th, 2009
Replies: 2
Views: 160
Posted By javaAddict
Providing private lessons is not what we do here. Check the Read Me thread with the tutorials on top of this forum, and we will answer specific questions about any errors you might get with your code
Forum: Java Oct 12th, 2009
Replies: 1
Views: 490
Posted By javaAddict
In case you haven't noticed we have October. Tanning is out of the question, unless you plan to use the application at the South hemisphere.
Forum: Java Oct 8th, 2009
Replies: 1
Views: 200
Posted By javaAddict
Usually a NullPointerException means that you are trying to use something that is null. So if you get the exception at line 63:

_file.pixels[x][iy].setValue("b");

it would mean that:...
Forum: Java Oct 7th, 2009
Replies: 19
Views: 1,130
Posted By javaAddict
From what I see you use a lot of "extending" that I don't think is necessary. Your code works but it could have been simpler.
First don't use the "dispose" method.

Second you need to close the...
Forum: Java Oct 6th, 2009
Replies: 4
Views: 297
Posted By javaAddict
I think he wants a javax.swing.* program.

What you ask is impossible because we don't know your requirements. We cannot just start writing a program that does nothing using random commands with no...
Forum: Java Oct 6th, 2009
Replies: 2
Views: 275
Posted By javaAddict
I believe that your problem is this:


String s1 = new String( secondLength );
....
lastName.getChars ( 0, 5, secondLength, 0 );

When you create the "s1" the "secondLength" array is empty....
Forum: Java Oct 2nd, 2009
Replies: 9
Views: 305
Posted By javaAddict
for (int l = 0; l < info.length; l++){
info[l] = loadPlayerPositions.readLine();

info[0] = Players.nameOfPlayer1.toString();
info[1] =...
Forum: Java Sep 25th, 2009
Replies: 6
Views: 330
Posted By javaAddict
Can you see something wrong with this code:


public void setName(String appt){
setName(appt);
}


You calling the same method. When you call setName it will call setName which is...
Forum: DaniWeb Community Feedback Sep 14th, 2009
Replies: 9
Views: 1,156
Posted By javaAddict
I am sorry for being late to respond to this.

Firstly if you read all of the posts related to that particular question in both threads (the poster created 2 threads),
you will reach to the...
Forum: Java Sep 4th, 2009
Replies: 6
Views: 491
Posted By javaAddict
I don't know if it is possible to get the "My Computer" as root, but check this out:

File [] files = File.listRoots();
for (int i=0;i<files.length;i++) {
...
Forum: Java Sep 3rd, 2009
Replies: 7
Views: 392
Posted By javaAddict
The only bug I see is you accusing a programming language which has been around for decades, used by thousands, for your incompetence.

Just because you can't get it to work doesn't mean it has a...
Forum: Java Sep 2nd, 2009
Replies: 11
Views: 295
Posted By javaAddict
Yes, we are good at it

What does this suppose to mean? Have you any idea what you are asking. It's not enough that you cheated at your assignment, you have the nerve to tell us that you cheated...
Forum: JSP Aug 31st, 2009
Replies: 1
Views: 357
Posted By javaAddict
The selElts you define in javascript is not the java array. They are not the same. What you have written doesn't work. You can not call javascript method to give values to java variables.


If you...
Forum: JSP Aug 24th, 2009
Replies: 2
Views: 397
Posted By javaAddict
You need to import the class:


<%@ page import="package.DBManager"%>
Showing results 1 to 40 of 92

 


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

©2003 - 2009 DaniWeb® LLC