Forum: Java 3 Days Ago |
| Replies: 20 Views: 295 It might help to know what these nebulous "errors" are. complete error message with stack traces (where applicable), please. |
Forum: Java 3 Days Ago |
| Replies: 8 Views: 158 Because what is automatically "converted" is the result of the operation, not the individual pieces of the operation. Therefore, the operation consists of two Integers 2/3, therefore Integer math is... |
Forum: Java 3 Days Ago |
| Replies: 8 Views: 158 Because 2 and 3 are Integers, so pure Integer math is performed.
Use a literal double (i.e. 2.0 instead of 2) or cast at least one of them to a double
double a = (double) 2 / 3;
// or
double b... |
Forum: Java 6 Days Ago |
| Replies: 2 Views: 144 Or Andy Khan's jxl (Don't believe this works as of Office 2007, however). As last resort you can use the JDBC-ODBC Bridge. |
Forum: Java 12 Days Ago |
| Replies: 9 Views: 266 |
Forum: Java 16 Days Ago |
| Replies: 5 Views: 210 Good for you. A lot of people react negatively to that sort of advice, so, truthfully, way to go. |
Forum: Java 19 Days Ago |
| Replies: 26 Views: 701 Huh? This is purely a compilation issue. What does applet, or not applet, have anything to do with it? |
Forum: Java 24 Days Ago |
| Replies: 6 Views: 186 BufferedReader, readLine, a counter, and String's split. |
Forum: Java 26 Days Ago |
| Replies: 9 Views: 337 Because without the static, that Test t = new Test(); is an instance variable, that is instantiated with every call to new. So, you call new Test() in main, which triggers another new Test, which... |
Forum: Java Oct 19th, 2009 |
| Replies: 9 Views: 5,076 By starting your own thread in the JavaScript forum, maybe? |
Forum: Java Oct 19th, 2009 |
| Replies: 9 Views: 473 Take a close look at my previous post.
The first code block is your code, the second code block is modifications to that code. |
Forum: Java Oct 19th, 2009 |
| Replies: 7 Views: 266 Aargh multi-post
http://www.daniweb.com/forums/thread231257.html |
Forum: Java Oct 17th, 2009 |
| Replies: 1 Views: 241 You are calling the ethod without any arguments, but the method is designed to take an int and a double, so give it an int and a double. |
Forum: Java Oct 17th, 2009 |
| Replies: 6 Views: 314 Write a method that reads the user input (I am assuming your getting input at various stages) and checks whether it is "quit" or not and otherwise returns the input as a String. Then, every place... |
Forum: Java Oct 16th, 2009 |
| Replies: 8 Views: 356 That information seems to encapsulate a session, so Google around a bit and find out how to maintain a session using HttpURLConnection. |
Forum: Java Oct 16th, 2009 |
| Replies: 14 Views: 899 Change this
to this
public detectUSB() {
initComponents();
}
and change this |
Forum: Java Oct 16th, 2009 |
| Replies: 11 Views: 376 MS Access is file based (i.e. no remote connections, local file access needed) and Applets do not have access to the local file system. A complete redesign is in order. |
Forum: Java Oct 16th, 2009 |
| Replies: 3 Views: 220 Each package has it's own directory (in the normal state of affairs, there are other ways of doing it, but we won't get into those).
I.E. Hypothetical, your source code is under
/my/source
and... |
Forum: Java Oct 15th, 2009 |
| Replies: 2 Views: 232 cmd /c <command>
See http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
And read it completely and thoroughly, although I can't imagine why you would really want to do all this. |
Forum: Java Oct 7th, 2009 |
| Replies: 4 Views: 297 On your profile page is a new "helpfulness percentage rating". These ups and down go toward that (the reputation still exists alongside this though, and these don't seem to affect that). |
Forum: Java Oct 6th, 2009 |
| Replies: 4 Views: 297 package thisIs.a.valid.packageAnd;
public interface MyInterface {
} |
Forum: Java Oct 6th, 2009 |
| Replies: 5 Views: 303 Correct, and, as I said in your other thread, it is because the image file (as referenced there) doesn't exist. Read the API docs for the getResource method carefully and completely. |
Forum: Java Oct 3rd, 2009 |
| Replies: 4 Views: 323 |
Forum: Java Oct 3rd, 2009 |
| Replies: 7 Views: 271 |
Forum: Java Oct 2nd, 2009 |
| Replies: 4 Views: 1,363 That is what I said, that super() is added by the compiler, if you don't add a super call yourself. I simply illustrated what the code effectively was. In fact, if your classes looked like this
... |
Forum: Java Oct 1st, 2009 |
| Replies: 4 Views: 1,363 Because the first line of every constructor, is a call to a super constructor. If you do not add it yourself (i.e. call a specific super constructor) the compiler automatically adds a call to the... |
Forum: Java Sep 15th, 2009 |
| Replies: 3 Views: 314 project -> properties -> libraries -> add jar |
Forum: Java Sep 14th, 2009 |
| Replies: 1 Views: 222 |
Forum: Java Sep 11th, 2009 |
| Replies: 6 Views: 308 java -jar <jarfile>
As stated in the tutorial that I linked to in one of your other threads. |
Forum: Java Sep 8th, 2009 |
| Replies: 4 Views: 188 This (!=p) is not a statement/expression. What is "not equal to" p? |
Forum: Java Aug 31st, 2009 |
| Replies: 1 Views: 158 java.sun.com
or
www.java.com |
Forum: Java Aug 26th, 2009 |
| Replies: 3 Views: 355 According to the API docs, countTokens() returns
So, before you call nextToken on a "tokened String" with 5 elements it returns 5, after calling nextToken once it returns 4, so, what do you... |
Forum: Java Aug 26th, 2009 |
| Replies: 4 Views: 191 What are you talking about? What from apache commons do you want to use? Are you thinking of using the FTP library from commons, or something else? The question, IMHO, doesn't make a lot of sense. |
Forum: Java Jul 27th, 2009 |
| Replies: 10 Views: 604 With two different variables, of course. That is why they are referred to with two different names. |
Forum: Java Jul 26th, 2009 |
| Replies: 5 Views: 368 Huh? What's wrong with the "endsWith" method of String? |
Forum: Java Jul 17th, 2009 |
| Replies: 9 Views: 454 No, they don't necessarily need to be in the same place, but it does need to be on the class path.
Say you have /classes on your classpath. And your class is my.package.MyClass. Then your class... |
Forum: Java Jul 15th, 2009 |
| Replies: 6 Views: 301 |
Forum: Java Jul 15th, 2009 |
| Replies: 2 Views: 200 |
Forum: Java Jul 10th, 2009 |
| Replies: 3 Views: 2,288 The only way to prevent decompilation is to not distribute your app. Provide it as a web-app and hope no one breaks into the server. Obfuscation makes it harder, and obfuscating and then, also,... |
Forum: Java Jul 3rd, 2009 |
| Replies: 5 Views: 369 System.out.println("Please Enter 2 values:(number must range from 1 to 9)else display error message");
System.out.println("value 1: 3");
System.out.println("value 2: 8");... |