458 Posted Topics

Member Avatar for charlie81

Instead of giving us th broad description of what you were supposed to do to start out with, where we have to figure out each and everything like the logic, methods, variables etc., give us directly the error that the compiler is throwing at you or tell us where you …

Member Avatar for verruckt24
0
167
Member Avatar for bugmenot

I am not sure about this, but does PERT/CPM fall under discrete maths ? If yes these are used in project scheduling and management and hence in the s/w made for such systems.

Member Avatar for xkey
0
187
Member Avatar for rayda

Thats because of this: [code=java] fermi value=new fermi(); [/code] Everytime you call the [icode]result[/icode] method you create a new fermi instance and assign it's reference to the same [icode]value[/icode] variable so that the previous total play, total win and total lose get washed off. In order retain the previous results …

Member Avatar for verruckt24
0
103
Member Avatar for rayda

The problem is you declare 'give' inside this while loop [icode]while(quit !=-1)[/icode] but then this loop ends at the '}' after [icode]give.totalPlay();[/icode], so that the 'give' variable goes out of scope and at this statment [icode]JOptionPane.showMessageDialog(null,"total play is "+give.totalPlay()+"\ntotal win is"+win+"\ntotal lose is"+lose);[/icode] the compiler cannot find a declaration for …

Member Avatar for verruckt24
0
126
Member Avatar for verruckt24

Posting in the Java forum of the community I have seen one thing happen more often than not. I have seen posters post onto a thread that has been solved years ago, but just weren't marked as solved by the OP. Take for example [URL="http://www.daniweb.com/forums/thread5399.html"]this[/URL] recent thread in the forum. …

Member Avatar for verruckt24
0
462
Member Avatar for slider_44

[code=sql] Select resortname from table2 where resortid = (select MAX(resortid) from table1) [/code] Try this.

Member Avatar for slider_44
0
96
Member Avatar for TidusBlade

>I hate how resource hungry some java programs can be Thats the thing from the Ice age. Now Java can really be as fast and efficient as some of the native language code. >I did some searching around and found two books Hmmm... Did you not search the sticky thread …

Member Avatar for TidusBlade
0
359
Member Avatar for caps_lock

This means your program is getting stuck up at some place, so there may be some exception causing this. Put a try-catch block and print a stack trace in the catch clause, you will soon know what happens.

Member Avatar for caps_lock
0
152
Member Avatar for scream2ice

Have you understood the question yourself ? What do you mean by this: [QUOTE]Describe a recursive algorithm for enumerating all permutations of the numbers {1,2,...,n}[/QUOTE] I don't think so, with the way you have copy-pasted the assignment-looking statement. If you haven't understood the question in the first place you cannot …

Member Avatar for verruckt24
0
534
Member Avatar for koolhoney07

I guess yes, but he would have been much happier if you would have dropped the multiple character typing (???) habit of yours too. That too is a symbol of chat/IM speak.

Member Avatar for verruckt24
0
2K
Member Avatar for enitsirc

I don't think so, but java docs can. Check the java docs for the methods and try implement the methods yourself those are some pretty basic ones.

Member Avatar for stultuske
0
238
Member Avatar for Frani

[code=java] System.out.println("Enter the name of the lab this computer is located: \t"); } [/code] Remove the '}' in this line that is what causes the previous while loop to terminate "prematurely" and on the next '}' it terminates the method/class, so that the next statement "appears" to the compiler out-of-place.

Member Avatar for Frani
0
130
Member Avatar for davi

@svincio: Did you happen to see the date of the previous post ? Way too back isn't it ? Perhaps start a new thread. @Daniweb Community : This is what happens when a solved thread isn't mark solved, people keep posting there for ages.

Member Avatar for stephen84s
1
358
Member Avatar for enitsirc

Your question is a little confusing but from what I have gathered here's what you need to do: Take several strings from a user sort them alphabetically and show them, in a text area, in sorted order. If yes, you can use the [icode]compareTo()[/icode] method of the String class for …

Member Avatar for verruckt24
0
82
Member Avatar for veledrom

What is the definition of [I][B]relevant[/B][/I] ? If you use the LIKE clause, you will get only those records in which the filed contains the content of the LIKE clause. So if you have all records containing the content you want, I don't think you can order them by any …

Member Avatar for veledrom
0
213
Member Avatar for lllllIllIlllI
Member Avatar for shahab.burki
Member Avatar for thijo

Check out the docs for java.util.Vector, where do you find the method getStandardDeviation() in it ? Also all the other errors are pretty straight forward, the compiler gives a reason for the error, the line number where the error occurs in your program and the shows the line too, you …

Member Avatar for BestJewSinceJC
0
98
Member Avatar for koolhoney07

If it is profiling that you need to do on your program/application and not only the overall time required for execution, I would suggest you to use the profiling tool accompanied with modern day IDEs such as NetBeans. But if it is just the overall execution time that you require …

Member Avatar for verruckt24
0
79
Member Avatar for darkagn

There are three methods in MouseEvent which could be of particular help, [URL="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/event/MouseEvent.html#getX()"]getX()[/URL], [URL="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/event/MouseEvent.html#getY()"]getY()[/URL] and [URL="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/event/MouseEvent.html#getPoint()"]getPoint()[/URL], getPoint returns the X,Y position relative to the source component while getX() returns the X coordinate and getY() returns the Y coordinate. Now what you could do is, divide the image in sections for …

Member Avatar for darkagn
0
173
Member Avatar for AirmanTheGreat

[code=java] for (guesses=0; guesses <= ichances; guesses++); [/code] The semi-colon [;] at the end of the for loop makes this happen, remove it.

Member Avatar for AirmanTheGreat
0
101
Member Avatar for digital_dizasta

You could attack this solution in this way: consider the x value that produces the maximum value for the function as a value that is to be "searched". And start off with an algorithm one like the binary search. To put this into perspective, suppose 0-40 is your range set …

Member Avatar for verruckt24
0
115
Member Avatar for cdeniz

start a new thread probably this one's already more than 3 years old.

Member Avatar for almostbob
0
99
Member Avatar for denniskhor

Strings in Java cannot be compared using '=='. You need to use the [icode]equals[/icode] method of the String class. So basically [code=java] if (paragraph == "\n\n") [/code] convert this to [code=java] if (paragraph.equals("\n")) [/code] Also are paragraphs always going to be with two new lines ("\n\n"), if not what you …

Member Avatar for Ezzaral
0
868
Member Avatar for rlaknar

Suppose that you are taking the username as input from the user in the Login page and passing it to the Login page's target page, then in the target page writing the belowwritten code would save the username in the [icode]session[/icode] variable, which will be available to you throughout the …

Member Avatar for verruckt24
0
95
Member Avatar for peedi

@curtissumpter: what do you think you are doing giving people ready made code, this forum boasts an attitude opposite of that. Tell the OP the logic mentioning the way to go about, or at the most the psuedocode, but not written code in any manner. @peedi : Use a stack …

Member Avatar for rameshrajamani
0
5K
Member Avatar for umshere
Member Avatar for tasneemnikhat

The forum announcement [URL="http://www.daniweb.com/forums/announcement8-2.html"]here[/URL] suggests that no one here would be willing to provide you homework help unless you show some effort. But I ain't much of an obeyer of the rules myself....sssssshhh.... *talking in a low voice* I can help you solve these assignments, even if you don't show …

Member Avatar for tasneemnikhat
0
121
Member Avatar for Monalisaparker

Check [URL="http://www.daniweb.com/forums/thread99132.html"]here[/URL]. aargh.... how do people miss this thread ?

Member Avatar for peter_budo
0
99
Member Avatar for rinky_gupta

How will we know, how you can do that, unless you post the relevant code and mention what problems do occur ?. Think before you post.

Member Avatar for verruckt24
0
64
Member Avatar for ezkonekgal

Yes recursion is very efficient in case of trees. I suppose from your question in the first post that you want to know how to load the tree. Well this depends on what purpose you want to use the tree for. If you are using the tree for sorting, you …

Member Avatar for verruckt24
0
379
Member Avatar for ceyesuma

And where's the code ? Seriously, I have never felt so much trouble making the sense of any post here. Do you have a serious question toask here or do you have the habit of occassional blabbering ?

Member Avatar for verruckt24
0
76
Member Avatar for tksrules
Member Avatar for peanutmeister

I don't find anything wrong in this piece of code. Post more code and the entire error trace to let us know more.

Member Avatar for verruckt24
0
86
Member Avatar for disaster

What you could do is : 1. Ask the string to be entered. 2. Trim it so that any leading/trailing spaces are removed. 3. Split it on the basis of (internal) spaces so that you can get the individual words in it. 4. Count the number of words. 5. Count …

Member Avatar for verruckt24
0
126
Member Avatar for weblover

[QUOTE=hell_tej;819487]Enjoy Java Programming:)[/QUOTE] How will he, when you won't allow him to by giving readymade code pieces ?

Member Avatar for weblover
0
151
Member Avatar for Andrieux

@manojjena1982 : Giving away readymade stuff like that wihtout attempting to make the OP learn isn't considered a good habit here, try to correct yourself in the future.

Member Avatar for verruckt24
0
117
Member Avatar for happygeek

What are the criteria that one could be selected for the title. (MotM) Is it that it is only the number of posts that count ? Posting in the Java community I have come across several members that might not have those many posts, but have been a real help …

Member Avatar for jbennet
0
617
Member Avatar for charlie81

[QUOTE=hell_tej;819469]Your Error in JOptionPane code write That code as Follows JOptionPane.showMessageDialog((Component) null, "Sum is:-", " your sum is " + String.valueOf(sum),JOptionPane.PLAIN_MESSAGE);[/QUOTE] Is this not exactly the same as what has been adviced in the previous post ? Whats the point of this then ?

Member Avatar for charlie81
0
193
Member Avatar for Q8iEnG

Go surfing. Do some research on your own, then come back tell us what you feel and then maybe we;ll let you know what we feel.

Member Avatar for Q8iEnG
0
170
Member Avatar for KraZy-Yhan

You cannot call a class from within another class, but what you can do is call a public method of one class from another class. Here's an exmaple: [code=java] public class Demo{ public void callMe(){ // callMe code } } [/code] Now we will call the [icode]callMe[/icode] method in another …

Member Avatar for hell_tej
0
78
Member Avatar for Lilal

what dickersonka wants to say is, you do not need to create an object of Car within itself. What you can do is simply push the code of [icode]newCar[/icode] into the constructor of the Car. Meaning the four statements where you pop up an input dialog in front of the …

Member Avatar for BestJewSinceJC
0
109
Member Avatar for bebe11bebe

From what I get from the first glance at your program is that, your for loops are working correctly and you are creating 10,000 Voter objects but in the first for loop you are assigning all the 3500 objects to the same reference v1 in the next you are assigning …

Member Avatar for verruckt24
0
99
Member Avatar for olgratefuldead

I assume here the numbers are the score over which you need to make an average, "-1" is the termination indicating character and the first string in a line is the name of the person. Well, what you can do here is read all the lines entirely from the file …

Member Avatar for olgratefuldead
0
197
Member Avatar for pash
Member Avatar for pash
0
71
Member Avatar for tazjaime

[QUOTE=JamesCherrill;817905]I suspect that 11 factorial is greater than the maximum value of a Java int (about 2,000,000,000), so you'll have to use a different data type (eg long) to go bigger.[/QUOTE] You haven't even taken care to look at what he is using for the result of the factorial before …

Member Avatar for JamesCherrill
0
202
Member Avatar for countyman

> I must also format the pay as currency Do you mean having decimal points ? If yes then you could define your pay variable as float/double according to your requirement. > Build an exit key What you could do is have a menu printed at the start of every …

Member Avatar for countyman
0
283
Member Avatar for theimben

So then when the line runs longer than the maximum width allowed for the post screen, how do you plan to show that ? If you use horizontal scroll bars for it, then lines can become too too long. This again causes problem to read, as one has to keep …

Member Avatar for verruckt24
0
150
Member Avatar for thijo

You can print out the output in CSV (comma-separated-values) format and then open this file in a spreadsheet application like Excel. If this is not what you want, detail out your problem.

Member Avatar for thijo
0
104
Member Avatar for ProgrammersTalk

The End.