4,084 Posted Topics

Member Avatar for divinity02

also, a remark: if(mileage > 30000) System.out.println("car needs servicing"); else if(mileage > 65000) System.out.println("car for sale"); } you can't use this system. to explain: for which value of mileage do you think it will not be over 30.000, but will be over 65.000? you'll need to add a second condition …

Member Avatar for divinity02
0
180
Member Avatar for fakesoul

make sure (or make enough people believe at least) that it is a very unique app that they can not miss from their devices, lest they would suffocate in the next 24 hours. You can't market an app based on "I have to sell it this many times". Marketing goes …

Member Avatar for stultuske
0
524
Member Avatar for Winston_1
Member Avatar for rubberman
0
297
Member Avatar for suyi.goh.5

something 'marketing-ly' ? Honestly, I have no idea. Is this an IT project you are going to work on? is it software? is it hardware? Did you check the requirements you were given? Usually, being able to decide on a project that you can complete within the deadline and with …

Member Avatar for stultuske
-1
51
Member Avatar for ali11

Where did you get this code? By just randomly copying code you've found on the net, you won't be learning coding yourself. `for (int i=1; i<=nod; i++){` This is the opening of an iteration, a for loop. The following block will execute while i is equal to or lesser than …

Member Avatar for JamesCherrill
0
134
Member Avatar for Devesh_2

JMF is ancient. they stopped supporting it years ago. you may want to look for a somewhat more 'up to date' technology. So, you tried something, but it's not successful. Can you show us what you tried and tell us what exactly went wrong?

Member Avatar for iamthwee
0
725
Member Avatar for SkateX

also a thought: if(Character.isUpperCase(ch) && !containsUpperCaseLetter) { containsUpperCaseLetter = true; } why this second condition ? are you afraid you'll overwrite true with true ? the above can be made shorter by just putting: if(Character.isUpperCase(ch) ) { containsUpperCaseLetter = true; } one time, this isn't that much, but you are …

Member Avatar for SkateX
0
561
Member Avatar for Akrhoo

What you can do to keep a history of the names: add an instance variable ( a list of names) and each time you call the changeName method, do something like this: private List<String> previousNames = new ArrayList<String>(); private String name; // ... public void changeName(String newName){ this.previousNames.add(this.name); this.name = …

Member Avatar for stultuske
0
80
Member Avatar for Sara_9
Member Avatar for stultuske
0
263
Member Avatar for AmrMohammed

You can very easily write applications that connect to a DB using just the Java SE JDK. but, my recommendation: if you are just starting with Java, as you say you are, you should start by learning Java. don't try to go from zero to a hundred in less then …

Member Avatar for JamesCherrill
0
195
Member Avatar for Trevor_5

the only thing I see missing is that line "Program 2 is developed by", but since you didn't coded it, it isn't missing, it's just not there yet.

Member Avatar for Trevor_5
0
253
Member Avatar for chahinez.abdelo.9

if you never worked with Java before, you'll first need to learn Java. so, inform your university that if they want code YOU actually wrote (and didn't copy paste), it might take a while.

Member Avatar for chahinez.abdelo.9
0
490
Member Avatar for manishgalav02

Way to vague, and way too little effort done yourself. We know way too little about your requirements to even start on it.

Member Avatar for stultuske
0
53
Member Avatar for java786

so: long story short, you posted your assignment here. the best thing you can do, if you actually want to learn something about Java, is at least try. trial-error is a lot more efficient way to learn something compared to copy-paste. at least with trial error, you actually thought it …

Member Avatar for stultuske
0
743
Member Avatar for divinity02

we don't know what your code is supposed to be doing, nor what it is doing wrong in your eyes. All we can comment on is what the code will be doing. If you want us to be able to be more helpfull, be more clear about what output you …

Member Avatar for stultuske
0
238
Member Avatar for Ed_4

> theres a couple things wrong with this it might be best if you told us how you know this. do you get a compile time, or runtime exception? if so, show the stacktrace. do you get an output you don't expect? then tell us what it is you do …

Member Avatar for stultuske
0
244
Member Avatar for Britto_1

you'll need to detect value changes. if it's not the default text: "select employeename from employees where department like <selectedValue>' and populate the second list.

Member Avatar for Britto_1
0
150
Member Avatar for amc2244

what is "from this point" ? What is it exactly you are trying to implement now, and what trouble do you have with it?

Member Avatar for Sugmuffen
0
631
Member Avatar for iamthwee

Why did this thread remind me of [this](https://www.youtube.com/watch?v=N8Y1q9RqBfc)?

Member Avatar for iamthwee
1
424
Member Avatar for subone

Nguyen: you haven't asked a question yet, how do you want us to answer it? If you mean the question asked by the OP, that has been answered. just read the previous replies.

Member Avatar for JamesCherrill
0
11K
Member Avatar for mickdrealist

And your point is? If you need help with anything, post what you have so far. Just to be clear: when I say "what you have so far", in case you missunderstood it, I didn't mean "post your assignment and we'll do it for you." The rules of Daniweb demand …

Member Avatar for iamthwee
0
2K
Member Avatar for Doogledude123

my advice: learn to write your persistency code in such a way that it's not db dependent. it's much easier to work if on changing a db, all you need to do is change one single property, and not your actual code.

Member Avatar for JamesCherrill
0
381
Member Avatar for shahera.arafat

newcoder: "you may instantiate but you would get a warning" ... not really. it would run perfectly, but chances are, you would confuse a developer reading your code, thinking he's working with instance methods and thus changing values for only a certain instance, not for all of them.

Member Avatar for shahera.arafat
0
401
Member Avatar for EarhawkPH

you can't ... either they are random, or the possible values are limited by already existing values (in which case, they're no longer random). what you can do is add the already chosen values to a list. When generating a new value: List<Integer> already; // .. Integer newValue = getNewValue(); …

Member Avatar for iamthwee
0
418
Member Avatar for shahera.arafat

In this particular case it doesn't matter, but some methods won't accept an array of bytes, only a String, as parameter, which is when you want to use this.

Member Avatar for JamesCherrill
0
391
Member Avatar for servent123

> Now only i heard about iReport. Thats sounds great. But I couldn't implement that iReport in the ongoing project because its almost done. How do you figure that? If having a report is part of the project, it won't be 'done' unless the report is implemented.

Member Avatar for servent123
0
343
Member Avatar for adams161

Yes, an exe can easily be bundled with your own code, but that does have it's implications on the server you can run it on. good luck trying to 'run' that exe on a Linux based server.

Member Avatar for iamthwee
0
508
Member Avatar for ShaneJ33

"I am missing something" ... Firstly, we have no idea what it is you are trying to write. You also forget to mention whether or not your code compiles/runs/..., so, whether it is a problem related to bad coding, or to a flawed logic. Be specific: we don't know your …

Member Avatar for ShaneJ33
0
562
Member Avatar for Christiaan

network configuration 'll probably help you out somewhere, or maybe not setting your firewall to block everything. just curious: since you can't get on any page, how did you manage to post here? :)

Member Avatar for Christiaan
0
395
Member Avatar for ali11

not working fine ... can you specify this a bit ? Does it run ? Does it run the code for that button or not ? Does it produce different output ? What do you expect ? What do you get ? Have you tried debugging it ? Is the …

Member Avatar for JamesCherrill
0
279
Member Avatar for Chalzer
Member Avatar for Christel_1

by installing the jdk on your computer. if it is installed, make sure you set the environment variables in your os (pointing to your jdk)

Member Avatar for Christel_1
0
81
Member Avatar for Zubenna

firstly, don't overuse variables. if you need three, don't declare five. use meaningfull names for you variables. it might be clear to you what s and k are supposed to do, or what they mean, but I have no clue. also: write it out first. you might see it becomes …

Member Avatar for Zubenna
0
1K
Member Avatar for manalibhadula
Member Avatar for manalibhadula
0
4K
Member Avatar for priyanka_10

why did you need a second thread with an exact same question ? yes, if a variable or a method are not declared as being static, they are instance variables/methods.

Member Avatar for stultuske
0
159
Member Avatar for divinity02
Member Avatar for rekhapalli

> their is no java programs in the computer must be because you haven't written them. and, remember, just like the english language, Java has a strict syntax you have to follow in order for the code to make sense.

Member Avatar for stultuske
-1
70
Member Avatar for divinity02

divinity: that wasn't an actual insult. he was pointing out that your code makes very little sense. for instance, the line he copied: `if(Character.toUpperCase(inputChar) ==('F') || Character.toLowerCase(inputChar) ==('f'))` Can you honestly say that you are capable of thinking of a way that the first expression (Character.toUpperCase(inputChar) ==('F')) would return false, …

Member Avatar for JamesCherrill
0
257
Member Avatar for Ant695

it makes perfect sense. A classname has to be one single word. public class SoftwareDevelopment { public static void main(String[]args) { System.out.println("Hello World"); System.out.println("2name"); System.out.println("name: \n"+name); System.out.println("\"name:\""+name); } } and the filename should be SoftwareDevelopment.java also, make it : `String[] args` instead of `String[]args`

Member Avatar for stultuske
0
131
Member Avatar for Gl753

actually, what you are trying to do is not possible. you are trying to compare the value of a String to that of an int. it's like comparing a banana to the most expensive model of the latest BMW series. if you want to compare them anyway, use the sum …

Member Avatar for stultuske
0
211
Member Avatar for divinity02

divinity: don't read noobz32 's response, or, since you did, ignore it. it is wrong. read James' remark instead. if you read it as a String, use the equals (not Equals) or equalsIgnoreCase method to compare them. if you read your input as a char, use the == operator to …

Member Avatar for divinity02
0
301
Member Avatar for amogh.max

Also: don't use StringTokenizer. It's only maintained not to break 'older' code. To quote it's api: > StringTokenizer is a legacy class that is retained for compatibility reasons although its use is discouraged in new code. It is recommended that anyone seeking this functionality use the split method of String …

Member Avatar for JamesCherrill
0
298
Member Avatar for Sam_13

you wrote this code .... what is that html doing in there? so, you need help with this ... memberShipType = JOptionPane.showConfirmDialog(null, "upgrade to 4.95?"); if (nResponse == JOptionPane.YES_OPTION) { System.out.println("User wants to upgrade");} else if (nResponse == JOptionPane.NO_OPTION) { why do you compare nResponse, which is a variable that …

Member Avatar for stultuske
0
199
Member Avatar for Orichaicum
Member Avatar for amogh.max

> but its too long and lengthy for a beginner to understand a good thing you are not a beginner, then. if you are a beginner, remove eclipse and learn to program without an IDE first, instead of learning to just use an ide. also: stop working on I/O material …

Member Avatar for stultuske
0
226
Member Avatar for SinzYPN

any help with what ? the assignment seems pretty clear. what is it you don't understand ? if you mean help as in "please gimme code", we don't do that. community rules require you to show some effort done by you. start programming. if you get stuck: tell us where, …

Member Avatar for Traevel
0
614
Member Avatar for senskart

with a key listener, for instance. you add a key listener that checks the input given, if it's not a number or a ., have it consume the event.

Member Avatar for JamesCherrill
0
169
Member Avatar for Sam_13

This seems like a pretty straightforward (and easy) beginners assignment. You haven't even tried to write it on your own. Something tells me you won't find this class very easy.

Member Avatar for JamesCherrill
0
656
Member Avatar for icanbeafrog

addCoin is similar to add, even if you use an ArrayList. You can also use an array, and for each .add create a new Array, with one more element, containing the new one. but just the snippet you posted above is way to little for us to know what way …

Member Avatar for JamesCherrill
0
162
Member Avatar for aya.dioses

The End.