2,443 Posted Topics
Re: [url=http://java.sun.com/docs/books/tutorial/reflect/index.html]Reflection[/url] | |
Re: There is a tutorial at the top of this forum. | |
Re: An int is 4 bytes which is 32 bits (31 of which is value and the 32nd is a pos/neg toggle). A long is 8 bytes (63 bits data and 1 pos/neg toggle) so use long and parse that String to a long using Long.parseLong(string). If a long is also … | |
Re: [code=java] while (room.length() == 0) { System.out.println("Error: This field cannot be empty"); System.out.println("Enter the name of the lab this computer is located: \t"); } // this } closes the while room = scan.nextLine(); } // so this brace closes the method [/code] I am fairly certain your "first" '}' commented … | |
Re: In Java regex, there is no reason to escape "/", and, if you [i]do[/i] need to escape something, then you also need to escape the escape as the escape character also escapes characters in String, in general (i.e. "\\" every place you need a "\"). | |
Re: One, remove that ";" at the end of the for loop declaration. That ";" [i]ends[/i] the for loop. Also, near the end of the block that is [i]suppossed[/i] to [i]be[/i] the for loop, remove that [inlinecode]guesses++;[/inlinecode]. Using that statement you would be incrementing "guesses" by two through every iteration of … | |
Re: `"jdbc:odbc:<DB>"` not `"jdbcdbc:<DB>"` You also need to configure your DSN (Google for that or ask at a Microsoft forum), and adding the Microsoft Access Driver does no good. Netbeans/Java is *not* using that, it is an ODBC Driver. Java is using the JDBC-ODBC Bridge which bridges to ODBC Drivers. Now, … | |
Re: Different processing speeds? I mean, really, the question means about nothing. What are the relative Processor Speeds, the relative network interface throughput, the relative hardware threading capability, the relative memory speed, the relative diskspeed, etc, etc, etc, etc, etc, (I think you, maybe, get the point). | |
Re: That is a Sybase question. [url]www.sybase.com/support/community-forums[/url] | |
Re: man test [ ] is a "shorthand"/"shell-builtin" for the command test. And, for reference, file-handle 0 is either standard out or standard in. I forget which and it has been years since I've had to worry about it. | |
Re: I don't believe so (although you can try with HTML marked text as with JLabel, but I don't think it works for a textarea). Check out JEditorPane. | |
Re: This is just so wrong on so many different levels. First of all, neither a servlet, nor a JSP has any business, what-so-ever even attempting to open a socket, much less a serversocket. You do realise that a JSP/Servlet is meant to be run mulitple times, right? And a serversocket … | |
Re: Initialise your high/low variables like this [code] int highest = Integer.MIN_VALUE; int lowest = Integer.MAX_VALUE; [/code] and you can't go wrong. ;-) | |
Re: I have no idea what it is you want. If it is that you want to develop Servlets and JSP's then you have what you need. | |
Re: It [i]is[/i] displaying every row but [code] t1.setBounds(20,20,200,200); [/code] when you put [i]every[/i] label in exactly the same place you only see the last one. I assume you are using the "so-called" null layout? If so, why? That is, usually, the [i]worst[/i] thing you can do to your GUI. Don't … | |
Re: When properly formatted [code] public double getTotal() { if (s) { return calcSummerCost(); { if (!s) { return calcWinterCost(); } } } [/code] Do you see your problem? I have the feeling that you used the wrong brace after [inlinecode]return calcSummerCost();[/inlinecode] | |
Re: Seeing the code (or at least parts of it) might help. But, if there were any "problem" (and there probably is), then you would get an error message, unless of you're catching the Exception and ignoring it. | |
Re: It prints that message because it is catching an exception and that is what you are [i]telling[/i] it to print. Add a stacktrace to that catch block and try again, so that you at least know [i]what[/i] is going wrong. | |
Re: [url]http://java.sun.com/docs/books/tutorial/essential/io/charstreams.html[/url] ![]() | |
Re: [QUOTE=budz;813622]wud be nice <3[/QUOTE] No it wouldn't. You might [i]think[/i] would be, but how would that help you on your next assignment, which is meant to build on what you learned in this assignment? If someone does it for you, you haven't [i]learned[/i] anything (and don't give me the bs … | |
Re: Well, if that's your [i]real[/i] code, I can believe it's not "sending any errors", as you're ignoring them. On the other hand, why don't you read the manifest file to get the Main class name, then start a thread, create a classloader, and call the main method from that main … | |
Re: Well, where the heck is kMeansPoint defined? Not in that code. Also, if you are going to ask on help with an error, post the [i]entire[/i] error and give at least some indication of [i]where[/i] in the code that error takes place. | |
Re: The textfields themselves are probably null. | |
Re: Create a toString method in that HeightStats close to control how it "prints". | |
Re: And? Have you tried using the [inlinecode]-Xlint:unchecked[/inlinecode] option to javac, yet? | |
Re: Not that it's [i]really[/i] necessary (as there is a package dedicated to LDAP in the Standard JDK [url]http://java.sun.com/javase/6/docs/api/javax/naming/ldap/package-frame.html[/url] ), but it [i]does[/i] make things easier. ;-) | |
Re: Of course you can declare char arrays, but be aware that each "String" [i]is[/i] a char array, so you would need a two dimensional array to hold char arrays equivalent to an array of Strings. | |
Re: [code] Where id LIKE ? </sql:query> <sql:param value="${param.id}"/> [/code] | |
Re: First of, it is [i]Swing[/i], not Swings. Second, you probably have not updated the container holding the table. Call validate(), and/or repaint() on the container. Third, there is no reason to create a whole new table. Create a new TableModel and assign that TableModel to the existing table. Then call … | |
Re: As soon as an object is no longer referenced it will be garbage collected (at the next GC run). If the only reference to that list was in that method, then yes, that list will be eligable to be GCed as soon as the method returns. Not that that method … | |
Re: [QUOTE=k2k;801527]hi, i just have many questions regarding abstract class, please briefly explain if you may. thanks. 1. what is the difference between declaring public abstract class and abstract class ? [/quote] Well, what's the difference between declaring public class and class? [quote] 2. should abstract class have a constructor? i … | |
Re: [url]http://java.sun.com/javase/6/docs/api/java/util/Scanner.html[/url] | |
Re: Well, using my powers of telepathy and empathy, I will tell you that character 6 on line 225 of your second class should be c. | |
| |
Re: Because "abstract1" does not declare that method, it cannot be called on an instance that is referenced as an abstract1 instance. Either you have to cast or declare it as "child" or you have to declare an abstract "child(side)" method in abstract1. | |
Re: [url]http://java.sun.com/docs/books/tutorial/deployment/applet/[/url] | |
Re: Each system command gets it's own "shell" (if you want to call it such, it's not really a complete shell, but it is an executiuon environment). So, the cd is working, but it's happening within that subshell, which means the shell in which the perl script itself is running, remains … | |
Re: This part of the code [code] class calculateButtonHandler implements ActionListener { public static calculateButtonHandler chandler; [/code] is declaring an inner class, which cannot have static types. Declare this class [i]outside[/i] of the class definition for OfficeAreaCalculator. P.S. Not that I think that that is the only problem with your code, … | |
[QUOTE=newtonorina][QUOTE=masijade][QUOTE=newtonorina]Am new in the programming sector. I have a task that requiires me to join a java interface to mysql but I don't know the code to do that. Can you please help.[/QUOTE] [url]http://dev.mysql.com/doc/refman/6.0/en/connector-j.html[/url] Next time start a thread.[/QUOTE] I just wanted a small program in Java for eaxample that … | |
Re: Then ask on the PHP forum, not the Perl forum. | |
Re: Okay? So what [i]exactly[/i] are you having problems with? Please refer to the forum "rules". We are not going to "finish" this for you. | |
Re: What does a JSP have to do with Screen Resolution? It might, with a few JNI libraries, be possible to change the screen resolution on the server (although I have no idea why you would want to, or what it might bring you), but not the client (which is, seemingly, … | |
Re: See the API docs for ProcessBuilder |
The End.