4,084 Posted Topics
Re: and what is the 'LITTLE PROBLEM' you are referring to? a suggestion: let your title describe the type of issue. don't make us guess as to what the problem is, make it clear in your post. provide all information: does it produce unexpected output? what do you expect? what do … | |
Re: a few remarks: 1. put your code in separate methods. the main method is just to initiate the application, nothing more 2. never allow your main method to throw exceptions 3. be more clear as to what it is. you want to 'store' the value from the combobox... in the … | |
Re: `.setText("");` IS what you have to do to clear the text. you could also put: `.setVisible(false);` or something similar. has it ever occurred to you that the reason it's not being executed is because your if-statement never returns true? | |
Re: no. it is not. there is also a big logical error there. it'll work, but it's useless. what you want is: create array fill array with dogs return array now, you may or may not want variable lengths, but then you still don't pass an array as parameter. try something … | |
Re: well, an int is a primitive type, not an Object. you could add a cast to Integer. | |
Re: what is the "solo ad campaign"? | |
Re: Indeed. just to add the reason why it should be euals, since it's very important that you get that straight away: '==' compares references. you can compare the value of primitive datatypes (int, boolean, ... ) using == without a problem, but when it comes to Objects, you'll want to … | |
Re: what's stopping you from using variables that can be read/written throughout your entire code? | |
Re: can you provide a bit more information? what do you mean 'distance'? can you explain that in words? since we're not talking about coördinates, how are you calculating it (or how should it be calculated)? | |
Re: do you have a class called StdRandom which contains a static method called 'uniform' and takes no parameters? the same for the other 'errors'. either the class doesn't exist, or it's in a different package and you haven't imported it | |
Re: you may want to add an actual question. anyway, since your class is not abstract, this will not compile: `private static void show(string, "Not Yet Implemented");` what you are looking for is: private static void show(String s){ throw new UnsupportedOperationException("Not yet implemented"); } as for here: `showMessageDialog(null, full_name, "Name",JOptionPane.ERROR_MESSAGE);` you … | |
Re: parsa: you don't have two numbers there. you have one f, and God knows what else. but f is not a number. JamesCherrill has shown you how to get the number from that f, I'm pretty sure you'll manage to find how to add two numbers together? if it's a … | |
Re: if a method is not static, that means it's an instance method, so you'll have to create an instance of the class and call the method through that instance. so `whitelist_check_names(a);` becomes: TestA a = new TestA(); a.whitelist_check_names(a); | |
Re: and your actual question is? this forum is not to help you cheat your way through school, but to help you improve your analytical and/or coding skills. just post what you have so far. if that is nothing, first start on it yourself, don't just post your assignment here. post … | |
Re: and using that profile picture if you can't figure out how to do that task, is really ... less than appropriate. | |
Re: tried `if (A [i][j]==1 || B [i][j]==1)` ? | |
Re: you should pass an instance of type 'E' | |
Re: basically: you have a closing bracket for the main method in the middle of the method. so a lot of code that has to be in a method, is floating freely in the class. | |
Re: it's showing you "lots of error". do you see where that doesn't tell us very much? before you even consider to start using a db, learn to use servlets, meaning, remove every single line of java code out of that jsp file. also: check this line: `import="java.sql.*" import=â€java.io.*†` if … | |
Re: for some tasks, sure. if it's just reading your horoscope online, no need for more. but, as Stuugie said: go and ask somebody who, for hobby or job, needs access to the latest and fastest video cards, whether they still have a desktop, or are completely switched to the laptop … | |
Re: how about you read every line in your file. use the split method and create instances of a (new) class TranslatedWord, having two members: word and translation store each of them in a List, Map, ... | |
Re: also: you should review your methods of "compiling"... what you call compiling is both compiling and running the application, and both the examples you've shown are wrong. do yourself a favour, don't start with RMI just yet. | |
Re: the title of this thread is 'Help me'. help you with what? | |
Re: is there an actual question here, or is it just meant to be a 'how-to' post? | |
Re: seriously? have you at least tried to 'view source' that page? right clicking is not that difficult, you know. also, if you hadn't noticed yet, the code you want to 'put' on your webpage is JavaScript, JavaScript (even though the name hides this fact a bit) is completely unrelated to … | |
Re: if you don't know that, you should: 1. uninstall netbeans 2. learn the basics. besides the fact that all use of netbeans changes here, is that you get generated crap that is called 'code' for some reason, which is pretty hard to read, let alone maintain (without introducing regression bugs). … | |
Re: what do you mean 'times table'? the number of questions you want to receive? or by which number should be one of the numbers to multiply? anyway, considering the fact we're talking about low numbers here, you should be using int, not double as type for your variables. `timesTable = … | |
Re: if you want to learn Java programming, you shouldn't be studying a dictionary's definitions. you should follow either a (decent) textbook's chapter on Exceptions, or the [official Java tutorials on Exceptions](http://docs.oracle.com/javase/tutorial/essential/exceptions/) | |
Re: same remark: they indeed seem to be chars, not objects. second remark: you can simplify that code a bit: public double getFahr() { if (tempUnit =='C') //assuming they are chars { return (5(tempNum-32)/9); } return tempNum; } | |
Re: you're not following regular naming conventions, for one. as for your problems: it would be easier to spot if you also mentioned what it is doing wrong. does it compile? does it thrown an exception? do you get the wrong output (and which)? ... but why are you looping over … | |
Re: certain code must be within a method, for instance the `System.out.println();` statements and the package statement must be the very first in your code, before any import statements. | |
Re: [Spring certification program](https://spring.io/blog/2008/01/17/the-springsource-certification-program) [JBoss/...](http://www.redhat.com/certification/jbcd_persistence/) look at this for hibernate | |
Re: well realhuman: writing code would help you a lot more then reviving dead threads. leave this thread alone. start working on your project. if you come into problems you can't figure out, start a new thread with your own questions. don't revive ancient ones. | |
Re: looks like you forgot the import statements for the types Square, Triangle, Octagon and Circle. | |
Re: 1. start a new thread - don't hijack an old one 2. show your code 3. show the actual error message 4. ... " it's in the same folder" ... doesn't automatically means your application is checking that location. | |
Re: without seeing the rest of the code, that's a bit difficult. is your textbox declared in a scope unreachable for the actionPerformed, maybe? personally, I prefer the public void actionPerformed(ActionEvent e) { if(e.getSource() == button1) } approach, bit easier to read. | |
Re: well .. the first one requires an int, so you'll need to pass an int. the second one requires a Node, so tNode should do. but you don't have an addNode method anywhere, so remove those calls. so: Node tNode = new Node(15); // or any other int tree.minimumVal(tNode); | |
Re: the code is not dependent on the IDE you use. if you don't know how to write code, uninstall your IDE, make sure you have the jdk, and use notepad++ and the command prompt, if only to learn the basics of compiling/running code. so far you have just copy pasted … | |
Re: unless you call a service on a server where you store all your .jars needed, but that would require network connection. | |
Re: Strings can not be modified. they're immutable. they can be re-referenced, though. well, how about you call a getMethod to get the value of the reference, and start building with that? but in the end: can you change the String itself? no. | |
Re: ehm ... a textfield will always contain a String, even if you input numbers. something like actionPerformed(ActionEvent e){ if ( myTextField.getText().equals("")){ // print error message return; // or throw an Exception } // normal flow } should do the trick but this is not in the least related to NetBeans. | |
Re: also: avoid doing this catch(Exception e) { System.out.println("I/O error"); } an Exception isn't necessarily an I/O error. print the stacktrace instead, at least that 'll tell you what is wrong, and where it went wrong. the above will just print a vague, and possibly totally wrong error message. | |
Re: and don't immediately jump to recommending JMF. It is quite old, no longer maintained/supported, and a mess, frankly saying. a simple import of the JavaZooms JLayer library would be a lot better. as for the OP: the first thing to do, is to realize that this is not eclipse-related. whether … | |
Re: `taxAmount = charge * tax;` how do you expect this to work? look at how you declare charge: `double charge;` since charge is a local variable, it doesn't have a default value. and even if it had, that default value would be 0. so change that line by something like: … | |
Re: by writing the code, but my suggestion: if you have a (valid) question, not just your assignment, start a new thread. don't hijack a dead one. | |
Re: that logic is very lousy indeed. what if you enter other numbers? your formatting 'll be wrong. you may rather want to format a String, and check it's size. if the size = longer than 3, add a space on the 4th last place. and so on, and so forth. | |
Re: that's a logical error on your part. remove the static keyword from the lastname and firstname variables. static means: class scope, not instance scope. if you replace the value, you do it for the class itself, and for each and every instance made of that class. also, you've got trouble … | |
Re: [this](http://docs.oracle.com/javase/7/docs/technotes/guides/security/crypto/CryptoSpec.html) is probably worth the read. | |
Re: does Character.toUpperCase(onlineTrade) return a boolean? if not, which I find the most likely answer, that's your problem. something tells me you meant: `if(Character.toUpperCase(onlineTrade) != 'Y' & Character.toUpperCase(brokerAssisted) != 'Y')` | |
Re: or, simplified: get the password; return (if the password is correct); |
The End.