4,084 Posted Topics

Member Avatar for corvenzo

a private class? maybe for inner classes, but I definitely wouldn't recommend it otherwise :) I think you ment the access modifiers public-protected-private(-package) for the variables?

Member Avatar for ash.28.88
0
480
Member Avatar for mp9036

most likely, you provided a date like "03/04/2012". so, you create an 'array' using the split method, but you don't split on "/", but on ",". since there are no ",", your entire String will be in the first element of the array, there will be no second element. as …

Member Avatar for poojavb
0
94
Member Avatar for Samyx

have you checked the forum opf OpenClinica? they're bound to be more experienced with this kind of stuff than we are.

Member Avatar for stultuske
0
85
Member Avatar for Thermalnuke

well, you are making it a lot more diffult than you should. also, you should use an index as value for your loop, not the value of the elements. for the first one, the easiest way is to use the enhanced for loop: for ( char a: Letter) // btw, …

Member Avatar for Thermalnuke
0
1K
Member Avatar for blake81

int guess1= scan.nextInt(); while((guess1 != 0)||(!game1.gameIsComplete())){ guess1 = scan.nextInt(); that's why you have to enter two numbers as a guess. replace it by: int guess1= 1; while((guess1 != 0)||(!game1.gameIsComplete())){ guess1 = scan.nextInt(); that way, it will run the first time, since guess1 != 0, but you won't have to enter …

Member Avatar for stultuske
0
144
Member Avatar for stardust85

I've just read this and recognized a lot of friends of mine (and, partially, myself) in it. it is true that you'll always will have to keep learning, since there will always be upgrades, new techniques, ... but the better your grasp on the basics, the easier that is. it's …

Member Avatar for rileyoneal
0
147
Member Avatar for Masque

you didn't call the methods min and max, and while you are creating an array of doubles, your methods expect an array of ints as parameters.

Member Avatar for Masque
0
487
Member Avatar for tborchardt

most employers expect a starter to have a degree, not so that they can prove they know "the stuff", basically, they don't, couldn't and aren't really expected to, but to show they are capable of learning new things on a short time, absorbing enough information to pass the exams. but …

Member Avatar for loisnees2012
0
232
Member Avatar for bhallarahul
Member Avatar for bhallarahul
0
105
Member Avatar for samc36

what do you mean by: > but my main issues arise when I try to figure out how to put that in the GUI. you can create a class Conversions with static methods, for instance: public static int getMeters(int kilom){ return kilom*1000; } while in your GUI, you call it …

Member Avatar for samc36
0
338
Member Avatar for james chaco

I do foresee one problem, that is that that method is able to return a null value, while the code calling it might be expecting a valid Connection. might be better to throw an Exception. also, if you're worried about having several Connections to the same DB at the same …

Member Avatar for SRocks
0
239
Member Avatar for SasseMan

get methods with huge side effects? what exactly do you mean by that? can you show us an example (doesn't have to be actual code, just an example of what you mean)

Member Avatar for SasseMan
0
247
Member Avatar for tleverington1
Member Avatar for tleverington1
0
2K
Member Avatar for ibthevivin

if (sent.charAt(count) == char 'a') this should be if (sent.charAt(count) == 'a') and ... also, you may want to print out the values at the end of your main method, to check if your counter worked as you want it to.

Member Avatar for SirMG
0
186
Member Avatar for helpsie
Member Avatar for helpsie
0
888
Member Avatar for mallikaalokam

ignore the Glassfish server, download Tomcat, install that and set the port yourself.

Member Avatar for Sadun89
0
237
Member Avatar for bhavna04
Member Avatar for stultuske
0
99
Member Avatar for naveen.gedipudi

if you're writing your application in Java, I would recommend taking a look at the [JDBC Tutorial](http://docs.oracle.com/javase/tutorial/jdbc/index.html)

Member Avatar for stultuske
0
53
Member Avatar for markjnj

what exactly do you mean by using the info out of the db? if you 're automatically going to use information stored in a table off the db, it's quite meaningless to have a login screen.

Member Avatar for NewJavaLearner
0
583
Member Avatar for jamesr12

[Code=Java] String var = "daniweb"; String val = "daniweb"; [/Code] the above will only place one String in the pool, and the other String will point to that one as well. [Code=Java] String var = "daniweb"; String val = new String("daniweb"); [/Code] since you here are explicitly saying you want …

Member Avatar for jamesr12
0
146
Member Avatar for sugir1987
Member Avatar for sugir1987
0
199
Member Avatar for devninja

don't hide exceptions (that is what you do here: try { Double.parseDouble(string); //Changes string to a Double super.insertString(offs, str, a); //displays it on the text field } catch(NumberFormatException e) { //if NumberFormatExcpetion what thrown do nothing } just add a e.printStackTrace(); inside that catch block tho show what happens

Member Avatar for devninja
0
454
Member Avatar for anand01

well, you should keep it in a database which you have control over, and the users can't access, otherwise you would need to have the key hardcoded on the client pc, so they could easily find it by reading through the files or decompiling the code. also, you should keep …

Member Avatar for anand01
0
376
Member Avatar for Ordella

bit hard to do, since we don't know what level you're at, what your curriculum exists of. just java core, have you been taught Swing (NetBeans WYSIWYG or actual coding), have you been learning frameworks, ...

Member Avatar for stultuske
0
110
Member Avatar for fatooma92

is there a reason why you create a duplicate thread? so .. what does it do, what ddo you want it to do and why do you think it's not doing what you want it to do? do take notice of this: we do not have a 'World' class, so …

Member Avatar for stultuske
0
220
Member Avatar for zAxOanL
Member Avatar for stultuske
0
431
Member Avatar for huskarit

as for the System.exit(0); command you tried -> this does not close the class you're working in, it stops the JVM, so everything running in it will be shut down.

Member Avatar for DavidKroukamp
0
565
Member Avatar for Q8iEnG

by checking your css and correcting it? or use something like a table structure or something in your html code. since we don't see any well formed code or stylesheet, bit hard to check for improvements if we can't see the current state.

Member Avatar for Q8iEnG
0
213
Member Avatar for slman

[QUOTE=slman;1783970]how can i write it in the Eclipse[/QUOTE] well ... typing your code in eclipse, rather than in a post here would be a good start. I don't really see anything wrong with your code above, so what exactly is it what you need help with?

Member Avatar for stultuske
0
102
Member Avatar for nyfan68

[Code=Java] if ( line.indexOf(theWord) != -1 ) System.out.println(line); [/Code] with line being the line of the input file and theWord being the word you're looking for. PS: never allow your main method to throw an Exception, that way you'll never be able to avoid your application to crash when there's …

Member Avatar for stultuske
0
393
Member Avatar for london-G

I have ... no idea whatsoever you are talking about. what do you mean by 'placed them on platforms'. also, if you've already placed them on platforms, doesn't that imply your enemy is on its own platform? please elaborate a bit more.

Member Avatar for london-G
0
87
Member Avatar for sugir1987
Member Avatar for FDRSOURCE

your camera class does not contain an 'add' method, so that's where you're having trouble. also, wouldn't it be easier to read if you added all the 'actionPerformed' methods in one big actionPerformed, and run the code based on the component that triggered it?

Member Avatar for JamesCherrill
0
182
Member Avatar for mehnihma

what exactly do you need? words in a sentence? isn't using the split method easier?

Member Avatar for mehnihma
0
163
Member Avatar for saswati_mishra

1. learn how to start a new thread 2. learn about sessions and storing information in them

Member Avatar for stultuske
0
258
Member Avatar for diafol

[QUOTE=happygeek;1751227]I'd rather watch paint dry... ;) (runs and hides)[/QUOTE] which color paint dried first? (I'm betting blue :) )

Member Avatar for happygeek
0
444
Member Avatar for krejar
Member Avatar for uzii305

well, you have two Strings: 1. your original word 2. a String the same length as your original one filled with *'s. you print the second one. whenever you guess a char, you verify with the original String if the char is in there, and if so, check the indexes …

Member Avatar for uzii305
0
376
Member Avatar for RinzLove
Member Avatar for stultuske
0
749
Member Avatar for xyxtss

or, if you mean that it may only be changed if it has a certain value, for instance, it has to be a positive value: [Code=Java] public void setMark(double mark) { if ( mark >= 0) this.mark = mark; } [/Code]

Member Avatar for stultuske
0
137
Member Avatar for parulparashar

requirements for sql server 2005, check their website, there should be a nice overview of them. you don't connect it to an IDE, you just create a connection in your code. you may want to check out [URL="http://docs.oracle.com/javase/tutorial/jdbc/index.html"]jdbc[/URL]. what do you mean with: make no. of instances?

Member Avatar for stultuske
0
106
Member Avatar for coroll
Member Avatar for gagirl1105

actually, that is half the work. allthough it's better to write it a bit like: [Code=Java] ... Integer.parseInt(((Game)theDB.get(i)).getHTScore()); [/Code] allowing your instance variables to be public accessible is a bit risky, using mutotars (setter-s / getter(s)) is a better approach. next to that, you'll need to keep a counter, that …

Member Avatar for gagirl1105
0
115
Member Avatar for bhallarahul

you're getting a nullpointerexception in your contextInitialized method. start with a System.out.println for your arg variable, to check if that passes what you think it is passing. add to each e.printStackTrace() a precision: System.out.println("error in first catch"); e.printStackTrace(); .. System.out.println("error in second catch"); e.printStackTrace(); and you'll quickly know where the …

Member Avatar for bhallarahul
0
367
Member Avatar for andreanah1

most commonly used way: keep a number of Chair elements, or an int counting the number of chairs, depending on the structure of your code, as an instance variable and use either the constructor or a setter.

Member Avatar for andreanah1
0
238
Member Avatar for stressed studen

you could show us how you're calling nextNumber starting from line 13 in that testclass, not really compilable, is it :)

Member Avatar for stultuske
0
161
Member Avatar for gerchi152
Member Avatar for Ezzaral
0
314
Member Avatar for Vampiricx3

a for instance: if you would like to work as a consultant, a lot of companies will say: fat chance. (I know the company I worked for would have) You being sent to their customer, you'll represent your company. you don't have any working experience yet, so it'll be hard …

Member Avatar for BruceVA
0
204
Member Avatar for choboja621
Member Avatar for choboja621
0
79
Member Avatar for sirlink99

few remarks on that.. you'll have to "make" your DB before you'll be able to use it, so the correct answer would be 'no'. what you are looking for is more along the lines of having a centralized DB, that's not run locally on each client machine, and that can …

Member Avatar for masijade
0
123

The End.