4,084 Posted Topics

Member Avatar for Accouter

what is the result you expect? what is the result you get? are there any error messages? does it compile? does it run? .... ?

Member Avatar for Accouter
0
226
Member Avatar for Stuugie

> At least it's better than getting downvoted because someone doesn't share your opinion on something, without any factual data to counter your argument. which happens quite a lot, in which is not the worst reason people use to downvote. if you downvote someone, and explain in comment why, if …

Member Avatar for Stuugie
0
211
Member Avatar for kay19

I might be a bit picky, but what exactly has this to do with "inheritance/interfaces", as you state in your title? might have overlooked it, but I didn't see the interface, and most of your methods are static, which means they aren't inherited anyway. also: a tip on code design, …

Member Avatar for kay19
0
192
Member Avatar for maxcatozzi

that is because Java, by default, supports wav, but it doesn't support mp3. if you want to play mp3 files, there are a few ways you can go: 1. the Java Media Framework (JMF), which is no longer supported and was, in my opinion, quite a pain to work with. …

Member Avatar for stultuske
0
1K
Member Avatar for Violet_82

you are reading int input and are treating it as booleans. that's not how it works. // about your first attempt. for the rest. .. we don't know what you pass as parameter, so how would we know what's going on?

Member Avatar for Violet_82
0
326
Member Avatar for bdl365_1

well, if you can use JFileChooser, I just must assume you've heard of mutators (setters/getters) before? using those, you can "pass" values from one class to another.

Member Avatar for stultuske
0
115
Member Avatar for ismail.eyiowuawi

so ... what exactly did you expect? if the current (now yesterdays) date is in your db, that result is correct.

Member Avatar for stultuske
0
283
Member Avatar for mattster

one of the main reasons Windows 8 is getting "very popular", is because a lot of computers and laptops alike are sold with it pre-installed. that doesn't really make it a good OS. sure, it has a benefit of being able to work with a lot of software that isn't …

Member Avatar for Assembly Guy
0
857
Member Avatar for bdl365_1

read up on JFileChooser. look [here](http://docs.oracle.com/javase/tutorial/uiswing/components/filechooser.html)

Member Avatar for bdl365_1
0
416
Member Avatar for PHIPH
Member Avatar for olugbade.nicholas
0
199
Member Avatar for sushants

as to 'how is Java platform independent', since my guess is that's your actual question. for each platform there is a different JRE, which handles the differences. so the code you write/compile, won't have to be re-compiled, you just need to have the right JRE installed on the system where …

Member Avatar for stultuske
0
107
Member Avatar for zxz

you may want to re-think some of the logic in there. if (Double.parseDouble(num)==0) { System.out.println("Number is cero"); if (Double.parseDouble(num)%2==0) { System.out.println("Number is even"); } else { System.out.println("Number is odd"); } } see the logical error there? in the first code you've provided, you've forgotten the possibility of a negative number. …

Member Avatar for stultuske
0
284
Member Avatar for noobCode
Member Avatar for stultuske
0
277
Member Avatar for rupom1969

and make sure the OP is clear about what he wants: a lot of people tend to mix up web developer and web designer.

Member Avatar for madelinekim
0
277
Member Avatar for riahc3

if (user.length()==0) { System.out.println("Please insert a valid member"); } wouldn't while ( user.length() == 0 ){ System.out.println("Please insert a valid member"); } or while ( user.isEmpty()){ System.out.println("Please insert a valid member"); } be better? now, I don't really know about this: > /*For some stupid reason, Java is stupid (no …

Member Avatar for peter_budo
4
878
Member Avatar for london-G
Member Avatar for kieuvantruyen
0
4K
Member Avatar for xxwikkixx

and what exactly is your question? it's clear you need a lot of additonal info on static and instance methods. actually, what you are asking for.. you're already doing.- (almost) you have declared the return value as an array of Strings.. set it to a simple String.

Member Avatar for riahc3
0
320
Member Avatar for andymarin

what do you mean "do not have a window"? what is it exactly you are trying to do, and what do those actions do? without knowing the code of those classes, it's pretty difficult to check what's actually going on.

Member Avatar for andymarin
0
709
Member Avatar for fffttt

by writing the code as such... without more explanation, that's about all the help I can give.

Member Avatar for JamesCherrill
0
80
Member Avatar for vivanie

not to mention that this is not a 'project', it 's about a single conditional statement.

Member Avatar for stultuske
-1
138
Member Avatar for leah.s.h
Member Avatar for stultuske
0
305
Member Avatar for riahc3

is that an error message you made yourself, or is that the message printed in the stacktrace? [FileUtils](http://commons.apache.org/proper/commons-io/apidocs/org/apache/commons/io/FileUtils.html#copyDirectory(java.io.File, java.io.File))

Member Avatar for riahc3
0
567
Member Avatar for game06

what do you need that for anyway? a better way would be to have your id set as "auto increment". no need for the developer to "calculate" the next id, if the db can do all of that for you.

Member Avatar for JamesCherrill
0
164
Member Avatar for wolwayne

well, I'm not going through all of that NetBeans generated Swing "code", but what I think you are looking for is not showing a new JFrame, rather hiding the current JPanel that is shown, and show another one, that is placed on the exact same coordinates, but was hidden as …

Member Avatar for stultuske
0
408
Member Avatar for vamshi381

ok... and what problem do you have with that? considering the fact that it's a jsp question [this forum](http://www.daniweb.com/web-development/jsp/24) is a more suitable place to post it, but I suggest you provide just a bit more information: * do you achieve to get the values * what are you / …

Member Avatar for stultuske
0
122
Member Avatar for sushants

[Oracle on servlets](http://www.oracle.com/technetwork/java/index-jsp-135475.html) basically, Servlets are classes that extends HttpServlet and that can be used (in combination with jsp) to create webapplications. if you want to learn more about them, I would recommend [this book](http://shop.oreilly.com/product/9780596516680.do). if you start creating them, questions might be quicker answered in [this forum](http://www.daniweb.com/web-development/jsp/24).

Member Avatar for stultuske
0
140
Member Avatar for rayden150

depending on your experience, start of with the universal basics, like pseudocode and, if you want to start using an object oriented language (without having used one before) read on about the principles of object oriented programming

Member Avatar for stultuske
0
258
Member Avatar for kulith

without seeing your actual code, and without knowing what it is you enter as input, it might be a bit difficult to see what you are doing wrong.

Member Avatar for stultuske
0
308
Member Avatar for upenrhar

try Googling from time to time, I'm pretty sure you would 've found [this](http://stackoverflow.com/questions/10523382/how-can-i-get-the-current-user-in-liferay)

Member Avatar for stultuske
0
38
Member Avatar for game06

check whether z is 0, if so, and your 'keys' is not a letter (it might come in handy to use the getKeyChar() method instead of the getKeyCode() method) so ... if this char is not a letter, don't add it to username, don't increase the value of z and …

Member Avatar for stultuske
0
126
Member Avatar for devanshee

sure we can do that, but char is a primitive type, you are trying to treat it as an instance of a class, which it isn't.

Member Avatar for stultuske
1
170
Member Avatar for Violet_82

setters and getters can also help you improve encapsulation in your classes. let's say you have a class 'Person', with age as variable (an int). if it's not set as private, you can put any value there. ever seen a Person that's negative 200 years old? but, with setters, you …

Member Avatar for Violet_82
0
173
Member Avatar for Violet_82

but myarray having a 0 length is not really "impossible", so throwing an error or exception, might not be the best idea.

Member Avatar for Violet_82
0
172
Member Avatar for jared.j.roberts.7
Member Avatar for radhakrishna.p
0
187
Member Avatar for sainaleni.guttula
Re: java

also, that is not always the case. tons of web-apps are written in Java, and they don't start with (don't even have) a main method. the main method is for desktop and stand alone applications the entry point for your application. it's a bit the same as asking: "when someone …

Member Avatar for stultuske
0
95
Member Avatar for JustLeftRavenholm

you could also show here what you've implemented... for instance like: do{ // ... previous code (you don't have to copy paste all of that readInputForTest } while (test==1) that might help us to see what's wrong with it.

Member Avatar for stultuske
0
219
Member Avatar for Sanjeev_2

are you talking about [this](http://docs.oracle.com/javaee/1.3/api/javax/servlet/jsp/tagext/Tag.html) one?

Member Avatar for JamesCherrill
-1
66
Member Avatar for markchua89

by reading up on the algorithm and writing the code. [Bubble sort](http://en.wikipedia.org/wiki/Bubble_sort)

Member Avatar for stultuske
-1
130
Member Avatar for bhallarahul

and ... why not make the constructor private? if the constructor is not private, what's to stop us from creating multiple instances?

Member Avatar for JamesCherrill
0
185
Member Avatar for Ancient Dragon

true, her politics caused trouble for a lot of people, but ... then again .... no offence, but look around. in the UK there's this one workless guy, has 17 kids with about as many (15) different women, and he lives on child support. now, lately, the guy has murdered …

Member Avatar for Agilemind
1
1K
Member Avatar for peymankop
Member Avatar for stultuske
0
384
Member Avatar for j.t.casperson

that's because they're not of the same type. just check the api for the [JList](http://docs.oracle.com/javase/7/docs/api/javax/swing/JList.html) and check what you can use there.

Member Avatar for stultuske
0
138
Member Avatar for modesto916

1. if you are just starting with Java, for now, stick with console applications and learn the language 2. do yourself a favour and do not use the NetBeans Swing editor. it generates hard-to-read-harder-to-maintain code that can be described as "crap". the worst of it is: you don't learn to …

Member Avatar for stultuske
0
209
Member Avatar for Aditya_4
Re: jsp

you get a NullPointerException. I assume you know what that is and when that's thrown? unfortunately, since the line the exception points to, doesn't exist in the code you show, so maybe you have a number of breaks in the file that aren't here? a few pointers though: don't use …

Member Avatar for IIM
0
138
Member Avatar for Violet_82

what you are writing seems to me more a mix between pseudo code and actual code. IMHO, if you stick to regular pseudo code, it'll be easier to write the code for the game.

Member Avatar for Violet_82
1
4K
Member Avatar for G_S

G_S ... your explanation of 2 makes no sense at all. what exactly are you trying to say there? for your point 3 - since we don't know what your teacher did, we can't really answer that. we also haven't seen any of your code, so we can't really comment …

Member Avatar for G_S
0
197
Member Avatar for anisha.silva

you are reading "this book"? hmmm ... let me just see if I have "this book" available right here. if that book is any decent all you need to know is either explained in there, or is listed as requirement before starting with it. most likely, it's explained, since getting …

Member Avatar for stultuske
0
214
Member Avatar for pooran.c
Member Avatar for pooran.c
0
2K
Member Avatar for jvcv

somehow I think the question is more related to: how do I add an action to my buttons, and call it by clicking on them?

Member Avatar for JamesCherrill
0
124
Member Avatar for Imene Hertha

this is about eight lines of code, and that includes lines with only a bracket. what have you got so far?

Member Avatar for <M/>
-3
345

The End.