4,084 Posted Topics

Member Avatar for andi-dev

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 …

Member Avatar for Doogledude123
0
132
Member Avatar for asaidi

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 …

Member Avatar for asaidi
0
2K
Member Avatar for thomas_18

`.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?

Member Avatar for thomas_18
0
211
Member Avatar for brittney_2

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 …

Member Avatar for stultuske
0
12K
Member Avatar for asaidi

well, an int is a primitive type, not an Object. you could add a cast to Integer.

Member Avatar for jwenting
0
274
Member Avatar for AbigailJird
Member Avatar for Reapt

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 …

Member Avatar for stultuske
0
227
Member Avatar for shit3432

what's stopping you from using variables that can be read/written throughout your entire code?

Member Avatar for stultuske
0
211
Member Avatar for cvandal

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)?

Member Avatar for cvandal
0
213
Member Avatar for Dane2259

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

Member Avatar for stultuske
0
288
Member Avatar for teitsu

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 …

Member Avatar for stultuske
0
203
Member Avatar for parsa123

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 …

Member Avatar for Doogledude123
0
162
Member Avatar for mrabrar09

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);

Member Avatar for mrabrar09
0
219
Member Avatar for nabilmahesaniya

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 …

Member Avatar for nabilmahesaniya
0
295
Member Avatar for xolani.ntsiba.7

and using that profile picture if you can't figure out how to do that task, is really ... less than appropriate.

Member Avatar for stultuske
0
119
Member Avatar for mellixa
Member Avatar for Pyler
Member Avatar for mellixa

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.

Member Avatar for stultuske
0
303
Member Avatar for Sudhanshu_2

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 …

Member Avatar for Sudhanshu_2
0
344
Member Avatar for help distressed

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 …

Member Avatar for Ancient Dragon
0
501
Member Avatar for PeterSodborg

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, ...

Member Avatar for PeterSodborg
0
299
Member Avatar for software girl

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.

Member Avatar for jwenting
0
443
Member Avatar for maazad.kalam
Member Avatar for KristinaRoy
0
78
Member Avatar for Szabi Zsoldos
Member Avatar for Szabi Zsoldos
-1
528
Member Avatar for muhammad.sadaqat.3192

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 …

Member Avatar for stultuske
-1
80
Member Avatar for mustafaaltup

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). …

Member Avatar for jwenting
-1
187
Member Avatar for mstoltz1

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 = …

Member Avatar for JamesCherrill
0
2K
Member Avatar for DmytriE

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/)

Member Avatar for stultuske
0
140
Member Avatar for Raymond_3

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; }

Member Avatar for JamesCherrill
0
192
Member Avatar for HacruLeian

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 …

Member Avatar for HacruLeian
0
1K
Member Avatar for Richa_2

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.

Member Avatar for Richa_2
0
297
Member Avatar for ganges

[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

Member Avatar for stultuske
0
95
Member Avatar for stupidenator

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.

Member Avatar for stultuske
1
2K
Member Avatar for amir4g

looks like you forgot the import statements for the types Square, Triangle, Octagon and Circle.

Member Avatar for JamesCherrill
0
351
Member Avatar for corby

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.

Member Avatar for JamesCherrill
0
6K
Member Avatar for StarTrekCafe

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.

Member Avatar for stultuske
0
171
Member Avatar for Datagram

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);

Member Avatar for Datagram
0
280
Member Avatar for Ismail_3

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 …

Member Avatar for Ismail_3
-1
178
Member Avatar for asif49

unless you call a service on a server where you store all your .jars needed, but that would require network connection.

Member Avatar for jwenting
0
125
Member Avatar for NetroNeil

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.

Member Avatar for stultuske
0
172
Member Avatar for ameer.mhmed

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.

Member Avatar for stultuske
0
299
Member Avatar for Richa_2

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.

Member Avatar for Richa_2
0
301
Member Avatar for danie93

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 …

Member Avatar for JamesCherrill
0
13K
Member Avatar for d.sign

`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: …

Member Avatar for stultuske
0
378
Member Avatar for oberle1515

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.

Member Avatar for pritaeas
-1
479
Member Avatar for snowy365

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.

Member Avatar for JamesCherrill
0
150
Member Avatar for JavaPadawan

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 …

Member Avatar for arnab.batabyal.54
0
22K
Member Avatar for Nandomo

[this](http://docs.oracle.com/javase/7/docs/technotes/guides/security/crypto/CryptoSpec.html) is probably worth the read.

Member Avatar for stultuske
0
222
Member Avatar for brittney_2

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')`

Member Avatar for Pobunjenik
0
140
Member Avatar for ameer.mhmed
Member Avatar for stultuske
0
119

The End.