2,443 Posted Topics
Re: Well, do you have method "main" in those classes? [url]http://java.sun.com/docs/books/tutorial/getStarted/application/index.html[/url] | |
Re: I'm sorry, but, why did you ressurrect this two year old thread? | |
Re: If you mean "the day after" the date provided, then see the Calendar class and it's add method. | |
Re: Um, no, nothing in that class is public, not even the class itself. | |
Re: this [code]totalPerDay[j] += sales[i][j];[/code] should not that first j be i? Hint: Yes it should, [i]according to the way that array is declared[/i], but [i]maybe[/i] (guaranteed) you declared the array wrong, in which case it shouldn't be. | |
Re: There are no such thing as either golobal nor global vars. There are "constants" i.e. public static final variables, but they still need to be referenced through the class. That can be done in the imports however using a static import. I.E. [code]// class Test1 package test; public class Test1 … | |
Re: The problem is, you have declared an instance variable s. Then in initializeStuff you want to give it a value, but what you really did was declare and define a variable local to initializeStuff rather than defining the instance variable. Change: [code] void initializeStuff() { String s = "aaa"; } … | |
Re: Try a vb.net forum. This has absolutely nothing to do with Java, abd most people here will look on this question with scorn. And taken in connection with you post, I must ask, what makes you think that you will get answers concerning vb.net on a Java forum. Boggles the … | |
Re: If you want to "split up" the initialisation, place the actual processes into private methods and call those methods from the constructors, rather than coding it directly into the constructors. And "private" is not a mistake. The methods [i]must[/i] be either private or final (or both, although that is overkill) … | |
Re: [url=http://www.iana.org/assignments/media-types/]registered iana media types[/url] (and a link to a registration form) | |
Re: Google first for some CSV utility library, then Google for some "rbnb server" (whatever [i]that[/i] is) utility library, and write a program to use them. | |
Re: In what way it "doest seem to be working"? That switch looks just fine. Maybe include a break in the default case, though, just for completeness. | |
Re: Timer and TimerTask (java.util and not javax.swing) | |
Re: Well, if you tell us what you're having problems with ... | |
Re: What is the return value if the age is 18? Either make the last one a simple "else", not an "else if" so the compiler is able to ensure that the method will always return something. | |
Re: I have no idea what it is you're actually asking here. | |
Re: You can't declare a method inside another method, and that one is being declared inside of main (as is the entire class, seemingly). | |
Re: This is exactly the sort of thing that RandomAccessFile is meant for. | |
Re: You have a double opening brace '{' for your main method (which is the reason that it is indented so far). Fix that. Then remove one of the "closing" braces '}' | |
Re: print the stack trace. How do you propose to find out what is going wrong when you ignore the cause. In any case, get all of this scriptlet BS [i]out[/i] of this JSP's. Create Beans and other helper classes and use those, don't use scriptlets, especially not ones of this … | |
Re: There is nothing wrong with the Error. It is 100% correct. Your code is wrong. (As noted above.) | |
Re: As long as the method is [i]not[/i] static, you will be using whichever one is most appropriate to the object it is being called on. I.E. if the same method is declared in that object it will use that one, otherwise it will use the one from its super class, … | |
Re: A shell script? Using ssh? | |
Re: Okay, so what do you have so far. We are not here to do your work for you, but we are more than happy to help you correct yours. | |
Re: [QUOTE=stultuske;1106421]hmmm ... don't have the time to look into it right now, but you're just showing a one-dimensional array. a two-dimensional one would look like: [CODE=JAVA] String[][] ColorAndDebt = new String[2][2]; ColorAndDebt[0] = {"RED","285"}; ColorAndDebt[1] = {"BLUE","180"}; [/CODE][/QUOTE] Uhm, no, array[index1][index2] = x is also a two dimensional array, just … | |
Re: That should only happen if you have used the same id in both cases. | |
Re: Configure the firewall to allow the connection. Edit: IOW it is [i]not[/i] a Java problem, it is a system configuration problem. If you do not know how to configure your firewall, then read it's documentation or contact its support. | |
Re: It would help to know [i]what[/i] error you get, and what line it refers to. Edit: And use code tags when you post code. | |
Re: If you insist on using RandomAccessFile (which I don't suggest), then call setLength(0) right after the seek. However, since you're reading the entire file, then operating on the data, then writing the entire file, use a FileReader to read it (assuming simple text), then close that, and use a FileWriiter … | |
Re: Read the API docs for FileReader and see if some other method there is better. Or wrap it in a BufferedReader, then read the API docs for BufferedReader and see if there is yeat another method there that is even better for your purposes. | |
Re: How are you loading the images? Hopefully with getResource (or getResourceAsStream) and not with File (or FileInputStream, etc) as the items in a jarfile are [i]not[/i] Files, at least until the jarfile is unpacked. | |
Re: No help whatsoever. @p00dle Why don't you show us your "read" and "print out" code? | |
Re: A program (so long as it is "self-contained") [i]is[/i] an application. What is your actual question here? Is it how to create an installer? Is it how to create "cool" start buttons on the desktop? etc, etc | |
Re: Thread Closed as it is old and has now become a simple dumping spot for "Give me teh codez" responses. No, thank you. | |
Re: [code] public class PerformanceAppraissal { public static void main (String[] args) { System.out.println("Unsatisfactory"); } } [/code] | |
Re: Don't use scriptlets in your JSP. Move this out into a Bean. If you still have a problem, post the Bean, and the JSP tags you use to access it, and we'll continue. | |
Re: No. Java is pass-by-value and pass-by-value only. When you pass an object rather than a primitive, you are not actually passing an object. What you have is a variable that is only a reference to an object, and when you pass this, what happens is that the reference value is … | |
Re: Do you know how to do it in HTML (since JSPs simply produce HTML pages)? If so, then do it, it's that simple. If not, find an HTML forum and ask there. | |
Re: You are probably "sending your data" on the event thread which prevents any other event from triggering (and prevent most other GUI functions as well) until it is finished. Your action listener should start another thread and that thread should "send the data", or, better, you should start a new … | |
Re: There is another forum for hiring people to do your work for you. This one is not it. | |
Re: Yea, simply change what's being displayed. It [i]might[/i] help to know exactly what you want to do, but just so you know, "AJAX" essentially imitates for browser client actions what is essentially native to standalone applications, so don't start out by thinking about what you can do in AJAX (or … | |
Re: None of those. This is simply accessing a file on a shared disk. Not a download at all. Take a look at his other threads on this forum about access times and downloads. | |
Re: [code] Arrays.sort(); [/code] | |
Re: Make sure the ssh is configured to allow public key access. Also, make sure your authorized_keys file is setup properly, [i]and[/i] are you sure its asking for a password and [i]not[/i] a pass[i]phrase[/i], which is connected to the ssh key. | |
Re: Well, then, Google for SQLite JDBC Driver. There [i]is[/i] one out there. It is [i]not[/i] a Type 4.0 Driver (AFAIK), however. | |
Re: There is no "conversion" involved. It is a simple cast, and after the return the instance will still be the same type it was before. And, it's not possible to "dynamically" change the return type of a method anyway, so the entire is doomed to failure. Maybe if you would … | |
Re: Um, I'm sorry, but what is wrong with [url=http://java.sun.com/javase/6/docs/api/javax/swing/JFileChooser.html]JFileChooser[/url]? In any case, if you insist on recreating the wheel, [url=http://java.sun.com/docs/books/tutorial/uiswing/events/actionlistener.html]here[/url]. | |
Re: [QUOTE=GiRL,IT;1074765] I want solution for code before saturday[/QUOTE] Then you'd better get cracking. We are [i]not[/i] a homework (cheating) service. Maybe next time you'll do your homework rather than go partying. | |
Re: It [i]might[/i] help to [i]see[/i] this "LOGIC ITERATOR", but if you are doing something akin to [code]while(next()) { if (valid) { print data } print newline }[/code] then, yes, of course, it is coming from your "LOGIC ITERATOR", don't do that. | |
Re: Well, what do [i]you[/i] think. We are not here to do your homework/quiz for you. |
The End.