4,084 Posted Topics

Member Avatar for AbdullahJava

because you don't have enough closing brackets ( } ) at the end of your class. you're missing two. add them, and it 'll work, but maybe they won't be on the right spot, didn't check for that.

Member Avatar for Philippe.Lahaie
0
86
Member Avatar for clapton

what do you mean: isn't correct. replace balance = -amount; balance -= amount; the same with balance =+ amount should be balance += amount if you want lesser lines of code: you don't need all those amount variables, you can just put balance += clapton.nextFloat();

Member Avatar for stultuske
0
201
Member Avatar for freedomflyer
Member Avatar for bcain2121

basically, the stack is the 'heap' on which all your (local) variables are created. if you never destroy or re-use any, just keep creating new ones, the time will come that your (limited) space on the heap is maxed out. if then, you're creating one more. bam. stack overflow. so, …

Member Avatar for JamesCherrill
0
288
Member Avatar for hurrycart

what kind of application are we talking about? desktop? web? .. as far as I can conclude out of your post, I'm with JamesCherrill on this, and would recommend a jar file.

Member Avatar for stultuske
0
129
Member Avatar for 47pirates

I assume we're talking about a chat application you are writing? if you have a group chat, you have a 'room' in which all your users are chatting. if you want a private chat, create a new 'room' (I assume this will be much like making the public room) in …

Member Avatar for dantinkakkar
0
146
Member Avatar for liphoso

your method is supposed to return an Object of type HugeInterger, but you're actually returning a 2 dimensional array of HugeIntergers. I can't say anything about where you call your method, but that 'll probably be a part of it.

Member Avatar for stultuske
0
245
Member Avatar for shaan_046

looks to me like you are mixing up Java and JavaScript, which are two completely different languages. can't you just use [Code=Javascript] myTextBox.setText("text to add"); [/Code] the getElement() method should be able to help you to get the myTextBox var.

Member Avatar for stultuske
0
232
Member Avatar for ladybro

you can store it in a String,instead of an array. you can easily get the length and character on a certain place (based on the index) of a String. the code you have now, will always continue until 16 because you tell it to. read in one String, verify the …

Member Avatar for stultuske
0
155
Member Avatar for MineCrafter
Member Avatar for johang_80

we also don't know what's in position, so it's a bit hard to test ourselves. do you have to do this using a method, btw? I think two nested for loops would be easier for a task like this.

Member Avatar for johang_80
0
193
Member Avatar for divsok
Member Avatar for StephNicolaou
0
116
Member Avatar for artemis_f

read the post above yours. it seems this has nothing to do with the original question, and the original thread has been dormant for several years. if you want to ask us something: * start a new thread * explain what you try to do and what your code does …

Member Avatar for stultuske
0
1K
Member Avatar for mehnihma

what is the actual problem, and what error message do you get? btw: [Code=Java] catch (NumberFormatException n) { System.out.println("BUUUU"); } [/Code] this will do no good at all, replace it (everywhere you have a structure like this) by [Code=Java] catch (NumberFormatException n) { n.printStackTrace(); } [/Code]

Member Avatar for stultuske
0
116
Member Avatar for adil_bashir
Member Avatar for dantinkakkar
0
168
Member Avatar for riahc3

try the same delete in a separate app, not the one you're writing it in, because you having still the reference to the file still open is most likely the problem. if you try with a separate app to remove it, you can test whether there's something wrong with your …

Member Avatar for dantinkakkar
0
282
Member Avatar for reen

[URL="http://docs.oracle.com/javase/6/docs/api/java/text/DecimalFormat.html"]DecimalFormat[/URL] might be a good place to start looking.

Member Avatar for nandosss
0
217
Member Avatar for MrHardRock

the more interesting part was the recursivity not being correct. to give a very simple (basic) explanation: a recursive method is a method that calls itself. for instance: [Code=Java] public int addTo100(int number){ if ( number < 100 ){ number += 1; number = addTo100(number); } return number; } [/Code] …

Member Avatar for dantinkakkar
0
2K
Member Avatar for Milutz94

if I read correctly: this is just what the :hover of css does, with that difference, that the dimensions of your image is in no way linked to the original image.

Member Avatar for stultuske
0
271
Member Avatar for xcrypted1

there is one remark though: you only should return the user input if it was valid, null otherwise, so: [Code=Java] if (aInput.length() == 1) { if (aInput.equals("A")) { System.out.println("Valid answer: A"); } // ... your other if's else { System.out.println("Invalid answer"); return null; // since here it would be invalid …

Member Avatar for stultuske
0
200
Member Avatar for jackbauer24

user io is a lot easier to learn/code than File io just let him take a look at the Scanner class and JOptionPane.

Member Avatar for zeroliken
0
309
Member Avatar for mcz2012

well sure, but why do you think that would be easier? if you want to go to the next line within a String object, there's always the "first line\nsecond line" you can use as a little bit of 'formatting'. \n => n preceeded with the escape char \, forces a …

Member Avatar for dantinkakkar
0
128
Member Avatar for eduardar
Member Avatar for dantinkakkar
0
37
Member Avatar for adil_bashir

[QUOTE=Marseline;1764496]Can you say more on this im really desperate for a project idea[/QUOTE] that ís a valid project idea. if we were doing everything for you, it would not be a project, it would more be like a download. this thread is already marked as solved, so no need to …

Member Avatar for stultuske
0
144
Member Avatar for lbgladson

use the startsWith("ro") method for rock, instead of equals("rock"). in order to make up for the IgnoreCase, [Code=Java] if (input.toLowerCase()).startsWith("ro")... [/Code]

Member Avatar for stultuske
0
194
Member Avatar for kyriacos1986

what do you mean 'can't find the given member'? where does GymList come from? how is the information stored in there? is found actually set to true? (does he ask for a new weight?)

Member Avatar for kyriacos1986
0
137
Member Avatar for Altarium
Member Avatar for Altarium
0
90
Member Avatar for mits28

use the int getInt(int columnIndex) Retrieves the value of the designated column in the current row of this ResultSet object as an int in the Java programming language. method of ResultSet.

Member Avatar for stultuske
0
459
Member Avatar for simplypixie

maybe a bit late, but: CSS is ment to deal with the layout. a table is ment to place certain data together, in the structure of a table.

Member Avatar for stultuske
0
145
Member Avatar for bhavna04

to add a comment box itself, html will do. as for handling the text, java, javascript, ... there are lots of ways out there to get that done.

Member Avatar for zobadof
0
191
Member Avatar for shean1488

I assume he's reading the lines instead of int's. just use the split method of the String class, you'll get an array of Strings which you can easily convert

Member Avatar for DavidKroukamp
0
311
Member Avatar for Stjerne

if you read your file using bufferedReader, add +1 to a counter for each line in the file.

Member Avatar for stultuske
0
182
Member Avatar for sha11e
Member Avatar for stultuske
0
3K
Member Avatar for wallet123

I think the setOptions method of the JOptionPane might help you out there. just check the [URL="http://docs.oracle.com/javase/6/docs/api/javax/swing/JOptionPane.html"]api's[/URL]. another way is to create separate JFrames, that way you can code the entire layout, which might be easier in some cases: you'll have complete control over which element is where in your …

Member Avatar for wallet123
0
87
Member Avatar for drico7041

[QUOTE=dantinkakkar;1763577]As for printing to files is concerned, just adopt a specific file format and save as per it keeping in mind that you have to read it later. [/QUOTE] what do you mean by this? he already chose to use '.txt' I assume he'll be reading it through the application …

Member Avatar for dantinkakkar
0
3K
Member Avatar for Vampiricx3

do you think it will break down soon? what you want to know is: how long will I be able to play the latest games with this setup? that would depend on what games you play, what new technology will be released and whether or not you are able/willing to …

Member Avatar for stultuske
0
106
Member Avatar for shean1488

still have an error is a pretty vague description. and yes, off course you're getting an error there. your puzzle variable isn't a two dimensional array, it contains one. add a getPuzzle() getter to your Sudoku class, and change: [Code=Java] for ( Cell [] myPuzzle : puzzle ) [/Code] to …

Member Avatar for stultuske
0
268
Member Avatar for Hussam Alahmadi

that is the question. what is your response on it? we're not going to write the entire code for you, just try and we'll help you work out the errors.

Member Avatar for DavidKroukamp
-1
137
Member Avatar for riahc3

also: depending on your IDE to 'auto-complete' your code is a crappy way of writing applications. better taking a few seconds longer, but knowing and understanding what you wrote when compared to knowing 'NetBeans(/Eclipse/...)' 'll solve the problem for me.

Member Avatar for riahc3
0
439
Member Avatar for HBK_100

what you also could do .... tell us: 1. what is the desired output 2. what is your actual output 3. is the code running or crashing? 4. do you get any error messages? ...

Member Avatar for JamesCherrill
0
183
Member Avatar for shibu2all

[QUOTE=dantinkakkar;1762774]Whoa dude. You expect me or anyone else for that matter to go through this? And you've not even placed any comments![/QUOTE] he didn't place comments because, as he said himself: it's not his code. it's some code he has "downloaded it from net"

Member Avatar for dantinkakkar
0
186
Member Avatar for thefifthhjohn

you should take a look where you are allowed to put a throws statement: [Code=Java] <AccessModifier> <ReturnType> methodName(<MethodParams>) throws ExceptionThatMightBeThrownInThisMethod{ <MethodBody> } [/Code] also, since you are working in your main method: don't add a throws clause, or put a throw ...Exception in your code. The main method is the …

Member Avatar for dantinkakkar
0
401
Member Avatar for RLS0812

and don't be rude. if you keep comparing it with != it will compare whether or not those objects are linked to the same reference in your memory, not whether they have the same value. just test this: [Code=Java] String aa = new String("a"); String ab = new String("a"); if …

Member Avatar for stultuske
0
143
Member Avatar for DEAD TERMINATOR

and what do you mean, you can't call a void method? either you make it a void method and have the variable whose value you are setting on either class or instance scope, or make it a method that actually returns the result of your calculation.

Member Avatar for stultuske
0
356
Member Avatar for M.Waqas Aslam

not one that I used anyway (but I've only used java professionally) why do you need something like this anyway?

Member Avatar for jwenting
0
302
Member Avatar for globalseo

well, you may want to be a bit more specific: are we talking about a commercial, or a personal site. are you willing to pay for it? do you mind adds? what language is it written in (yes, this can have an effect) does your website has a title that …

Member Avatar for ADRIANEra
0
128
Member Avatar for wallet123

well, just do a quick google search on 'java bubblesort'. it's quite easy and you'll find enough examples that 'll help you solve this in no time.

Member Avatar for wallet123
0
1K
Member Avatar for ali.jay110

no offence, but what exactly is your problem? also, why do you declare your argument as final? and why, if one of them is a final, do you give it the same name as your instance variable? yes, been up late ... yes, had a lot to drink ... no, …

Member Avatar for ali.jay110
0
341
Member Avatar for angryKitten

what you could do is create a class ValidCombo, which has two int instance variables. then, create an array of 'valid' combinations. for instance: [Code=Java] ... // instance var ValidCombo[] valid = new ValidCombo[3]; ... // in your main valid[0] = new ValidCombo(1, 1); valid[1] = new ValidCombo(1, 2); valid[2] …

Member Avatar for JamesCherrill
0
137
Member Avatar for dsmith12

what makes you think your code runs twice? can you give an example of the input you've given, and the output you actually expect for that input?

Member Avatar for stultuske
0
220

The End.