4,084 Posted Topics
Re: I'm working on a webapp on which houses, appartments, ... can be sold not by private persons, but by the notary's themselves, so everything (except for the signing of the document by the notary) can be done online. it's build in GWT and uses Spring, Hibernate and some other smaller … | |
Re: this is no 'new issue' this is exactly the same as your other thread. if you need to input it in the command prompt, use an instance of the Scanner class. if you need a dialogbox to enter the input, use JOptionPane | |
Re: define "import"? your .jar file is supposed to contain your .class file (and, if you want, your code and stuff like images) but an input file to use and handle shouldn't really be in there anyway. | |
Re: the class double doesn't have a method transerIn you'll need an instance of the class you're working in, and use a method of this: [Code=Java] // create an instance instance.transferIn(transfer); [/Code] | |
Re: in which dialogbox do you mean? if it's in the last ones, you do know that the .round() method does that, right? | |
Re: this looks and afwull lot like another thread you started. what exactly is your question? what exactly ceil does, how you should fit it in your code or why you should do so? you should better start easy, doing this step by step. for instance, calculating the basic cost, without … | |
Re: [QUOTE=ThaiAmL;1747523]Hello! I'm doing my first homework assignment with abstract classes and interfaces. I have a few questions: (1) I know that a class must be saved on the computer as, for example, Class.java. Is this the same for abstract classes? How are interfaces supposed to be saved? Do they need … | |
Re: why not choose an element (id, name, ... ) of your object and add it to the jcombobox? | |
Re: maybe a script that checks when the previous post was, to verify whether or not it still is an active thread. this way, you can have something like : [Code=PseudoCode] activeThread = VerifyThreadStillActive if ( activeThread ) post reply else don't revive the ancient thread [/Code] | |
Re: you really expect us to find an answer based on what you posted above? no code, no properties, .... do remember, that most likely the problems you have with NetBeans are not caused by NetBeans, but because you've forgotten to do something, or you have forgotten to remove something. | |
Re: and never dismiss errors like this as 'random'. they clearly indicate what kind of mistake you've made and where you made it. | |
Re: what exactly are you trying to do? put all your snippets in servlets, or create a Swing (or other GUI-package) based desktop client? | |
Re: well, sure you could use Java for that. do you have any experience in Java developing? I don't really see that much difficulties with writing something similar, so what are you having trouble with? ![]() | |
Re: you don't have a stack. first thing to do is add one. a stack is like an array, you can add things to them, take them out of it again, step by step. for instance: if you add four elements to a stack, and you take three elements away, without … | |
Re: [QUOTE=befigard;1743866]I don't know how to. Sorry this is a 9 week class, and quite frankly I'm not impressed....they haven't taught us anything we 'need' to know. I'm winging it just to get through the next 2 weeks.[/QUOTE] well .. they didn't 'need' to teach you how to read, did they? … | |
Re: you may be a bit mroe clear about what exactly you are doing. a Swing gui, a web app, .. and what Body class are you using? also, what do you mean by 'Platform' | |
Re: create an array of ints with 99 elements. iterate over your vectorf: newArray[foundNumber-1] += 1; | |
Re: store a reference to the file, or the file itself, in your database. | |
Re: and if you have to enter the assignment tomorrtow, you 've propably had enough time to solve it by now. | |
Re: you need to have ArrayListADT inherit from the original ArrayList class, otherwise, there is no add method in there. the problem in your second code is that you try to do something like this: ArrayList<String> a = String[] myStringArray; and a String[] just isn't an ArrayList<String>; | |
Re: you mean a second screen? MySecondFrame sFrame = new MySecondFrame(); | |
Re: with the indexOf method, you'll be able to detect where there are mathematical symbols, such as * + / next, use the substring method, to divide the String you have, and run the Integer.parseInt method on the substrings you've found. but make sure you only have non-decimal numbers, otherwise, an … | |
Re: you could use a Timer. or have a method like this: [Code=Java] public static void sleep(int milliSeconds){ for ( int i = 0; i < milliSeconds; i++ ){} } [/Code] this is just an example, not the most efficient way, and most likely an int is not the best type … | |
Re: [Code=Java] for(int i = 0; ; i++) { [/Code] here's your initial mistake. you keep running this for loop, without it ever stopping, since you don't set an expression which decides until what result to iterate over the block. also, take a look at the first lines within your for-loop: … | |
Re: I guess it would be possible for him to learn how to program in a language like C or java, but (and there's a serious 'but' there) that 's only the case if he's first willing to spend quite some time learning the language (and I'm not talking 'a few … | |
Re: maybe your list has so many elements so it seems to be an endless loop. add a print in your method before your loop, and print that size, it's a long shot, but makes more sense than: doesn't return anything. either it never reaches one of the result statements, or … | |
Re: read it using an instance of the Scanner class. you read the entire line as one single String. next, use the split() method to split that String to the separate names. after which, paste them together in the order you see above, you can use charAt(), substring,.. and simple String … | |
Re: no [Code=Java] if ( !J1.isEnabled()) [/Code] | |
Re: I think this is more a question for the WebDevelopment fora (I think there is a PHP one). never used PHP myself, but have you considered storing it in the Session, or keeping cookies? ![]() | |
Re: you may want to elaborate a bit. are you the only developer working on this project? is your repository local or on a remote server? are you willing to pay for the program? me, I've started on a few projects a while ago, which I don't always have enough time … | |
Re: not to mention the phrase " I have the whole layout of the website" raises a few questions. Do you mean you ripped the layout from an existing site and modified it a bit, or have you actually used some HTML, CSS, JavaScript, ... to create a layout yourself? even … | |
Re: personally, I don't think any employer will go look at the exact grades. sure, they might check on whether or not you had honours or not, but going over every exam, to check every grade for each candidate ... that would get a lot of overhead for their part. for … | |
| |
Re: tomcat would do just fine, since it is a 'Servlet and J(ava) S(erver) P(ages) container'. (just as masjiade suggested) follow the steps masjiade told you about, and it should work without a problem. | |
Re: how exactly did you try to use the javac command? personally, I've never heard about this error (not by the javac command, anyway). | |
Re: wordList.contains(myWord); doesn't work for you? | |
Re: [QUOTE=jasonrefan;1743668]How do I incorporate this into my GUI? I have my write and read methods coded, but do not know how to tell java that when it reads the empty line, that's the end of the record. So when I press (Next Track) it knows to move from musicID 1's … | |
Re: [QUOTE=subbumca08;1743645]The more simplest one is [code=java] public class Palindrome { static public String pal(String str, int i, int j){ if(str.length()/2 != i) if(str.charAt(i)==str.charAt(j)) pal(str,++i,--j); else return "String is Not palaindrome"; return "String is palaindrome"; } public static void main(String[] args) { String str = args[0]; System.out.println(pal(str,0,str.length()-1)); } } [/code][/QUOTE] an … | |
Re: what do you have so far? | |
Re: or you could go thinking along the lines of a List. that way, you wouldn't have to know the number of elements up front. | |
Re: define: particular website? are we talking about a commercial site for which you need to be registered/licensed? | |
Re: setCount to zero while setCount < 6 { add lotteryNumber add 1 to setCount } | |
Re: [QUOTE=NormR1;1743321]Wrap the code in a while or do while loop that requires input from the user to exit.[/QUOTE] thought of posting this as well, but he already stated that he solved it. @OP: a better way to let the community know that your problem is solved, is to mark the … | |
Re: you may want to show a bit more code. I doubt that just the 'float: left' on it's own is responsible for this. | |
Re: I assume you have tried the setText() method? also, could you please explain what you are trying to do with this method: [Code=Java] public int setId() { return getId(); } [/Code] | |
Re: have you looked at the [URL="http://docs.oracle.com/javase/tutorial/uiswing/events/actionlistener.html"]oracle tutorials[/URL]? | |
Re: try with: != also, your second number looks quite ... odd to me, don't really have time to figure out the logic, but it just does. | |
Re: [QUOTE=nlyn;1742166]I need help in my Connect Four program. Specifically in placing the user's input on the gameboard & also checking horizonallty, vertically, etc. [/QUOTE] can you be a bit more specific? | |
Re: [QUOTE=Thermalnuke;1742095]Well after doing some research my book dosent really cover FLOAT, I think i have figured it out. and Ezzaral this is not for class i am trying to teach myself java BY MYSELF im just using a book for problems to use. I am in college,but i am not … | |
Re: I'm a bit at a loss here... why do you enter the values manually to overwrite them with hardcoded values? also, what exactly do you mean by [Quote="karanc"] I'm a bit confused as to what code i should put next to get the total. Also if i had to add … |
The End.