2,777 Posted Topics

Member Avatar for kyriacos1986

When you post error messages please post the full text of the error message showing the contents of the line and the line number. Where are ArrayStack and ArrayQueue defined? For items 3 & 4: If your Stack takes Strings you can not push other datatypes on it.

Member Avatar for kyriacos1986
0
2K
Member Avatar for MisterRaver

Can you explain What do you want to do when the ServerSocket's accept() method returns a Socket with a connection? Normally you would pass that Socket to a class and method to handle it. Why can't you do that?

Member Avatar for MisterRaver
0
261
Member Avatar for jaxi

[QUOTE]number of compilation errors[/QUOTE] Please copy and paste here the full text of the error messages.

Member Avatar for NormR1
0
204
Member Avatar for DaniwebOS

When in doubt, read the manual. In this case the API doc for the class you are using.

Member Avatar for NormR1
0
458
Member Avatar for begueradj

How would the value of attribute get changed to 1? Your posted code does not show any reason that the value would not be 0 when you call method2. Can you show your code that will cause the value to get changed? Add a println statement after where the value …

Member Avatar for JamesCherrill
0
215
Member Avatar for bombay1982

Have you taken a piece of paper and worked out what is to be printed on each line. The number of spaces and the values of the digits for each row. Then figure out what variables you need to use to how the values of the digits as they are …

Member Avatar for NormR1
0
367
Member Avatar for umsungun

Can you explain what your problem is? Do you have some specific questions? When you post code, please put the code in code tags. Use the CODE icon above the input box. Unformatted code is hard to read.

Member Avatar for NormR1
0
196
Member Avatar for maurya10

[QUOTE] incompatible types found : int required: java.lang.String[] String[] arr = Integer.parseInt(mem_add[k],16);[/QUOTE] What don't you understand about this message? the compiler found an int where the datatype should be(required: ) a String What does parseInt() return? What is to the left of the = ?

Member Avatar for NormR1
0
239
Member Avatar for nsyncpilu

Sorry, I can not understand your problem. Can you post a small program the will compile and execute and demonstrate your problem? Your application must have at least one class that has the public static void main method in it. That method should start the application by creating other classes …

Member Avatar for NormR1
0
995
Member Avatar for javausers

Please show the output and explain what is wrong with it and show what you want it to be.

Member Avatar for JamesCherrill
0
108
Member Avatar for th3b3n

Your code has third party packages in it that not everyone has making it impossible to compile and test your code. Can you make a simpler version of the program using java SE classes that demonstrates your problem. Your problem sounds like you are using the GUI's thread to do …

Member Avatar for th3b3n
0
209
Member Avatar for thechicken

Do you have any specific questions about your code? If you are getting errors, please copy and paste them here. If the output is wrong, show the output and explain what is wrong with it.

Member Avatar for WolfShield
0
114
Member Avatar for AliALghamdi

Can you explain what the problem is. Show the output and explain what it should be. Do you get errors? If so, please copy the full text and paste it here.

Member Avatar for NormR1
0
152
Member Avatar for dark_sider_1

You don't post the correct answer. Will the correct answer fit into the type of variable you are using? Otherwise have you used smaller values, done the math steps manually and compared the results of your program with your manual method to see if your code is doing what you …

Member Avatar for NormR1
0
189
Member Avatar for gahhon

Your code does not compile. You need to get a clean compile before you can execute it. Please post the full text of the compiler error messages here.

Member Avatar for thines01
0
276
Member Avatar for Danielhuo

Can you explain what your problem with more specific questions? Please edit your post and wrap the code in code tags. Use the [code] icon above the input box.

Member Avatar for Danielhuo
0
1K
Member Avatar for MisterRaver

[QUOTE]creating more servers when the program will have to wait for the thread to finish anyway?[/QUOTE] What program would be waiting? Are all the requests coming from one thread in one program? If each request is given a thread to service it, a limiting factor would be the number of …

Member Avatar for NormR1
0
363
Member Avatar for Daigan

[CODE] if (sentence == word)[/CODE] Use the equals() method when comparing the contents of two String objects. You use == mostly with primitives like int and char.

Member Avatar for NormR1
0
155
Member Avatar for geekman89

Have you tried getting the location of the panel and then adjusting your components positions by considering the panel's location.

Member Avatar for geekman89
0
276
Member Avatar for applejax77

[QUOTE]where do I place it to work in my program?[/QUOTE] Put it where you detect [B]when the user fails to enter any information[/B] Where in your logic will you be sure the user has entered all the data you require so you can make this test? Does the user press …

Member Avatar for NormR1
0
1K
Member Avatar for yazz110

[QUOTE]how you can input information from one array to another[/QUOTE] You would use an assignment statement like with any other variables. Left side of = receives the value Right side of = is the source of the value ar{i] = ad[j];

Member Avatar for NormR1
0
240
Member Avatar for Danielhuo

Is this a duplicate post? [url]http://www.daniweb.com/software-development/java/threads/395733/1697767#post1697767[/url]

Member Avatar for peter_budo
0
845
Member Avatar for nchy13

The java command takes the name of a class for its argument. You have give it the filename of the source file. The class name is the name of the class not the name of the file. There is no .class in a class name.

Member Avatar for NormR1
0
105
Member Avatar for junsugal

[QUOTE] it shows me NullPointerException...[/QUOTE] Please post the full text of the error message. It has needed info about your code. Did you find the variable that is null? Did you look back through the code to see why that variable is null and change the code so it is …

Member Avatar for NormR1
0
168
Member Avatar for Muna Oman

[QUOTE]need a code for generating random numbers [/QUOTE] I see that you are using the Math class's random method and the Random class. Can you explain what your problem is? Show what the program does and explain why that is not what you want and show what you do want.

Member Avatar for NormR1
0
657
Member Avatar for JRDJ12

[QUOTE]how to pass the sorted array[/QUOTE] Which array are you trying to pass to what code? Can you explain a bit more? Where do you get/define the array, where is it sorted and where do you want to pass the sorted array?

Member Avatar for NormR1
0
263
Member Avatar for Mojtabarahimi

[QUOTE] subMenu(); ^ symbol: method subMenu() location: class FerryTicketingSystem[/QUOTE] You have left off what the error was. Please post the full text of the compiler's error message.

Member Avatar for NormR1
0
2K
Member Avatar for mary786

To debug these kinds of problems, you need either an interactive debugger or you must add lots of printlns to your code to show the logic flow and the values of the variables that are controlling the logic flow. When you print out the values of variables be sure to …

Member Avatar for NormR1
0
204
Member Avatar for vaironl

Why are you using the Scanner class inside of the Recipe class if you want to gather the values to be used in the Recipe class's constructor? Should you get the values in another class and then call the Recipe class's constructor with those values.

Member Avatar for vaironl
0
126
Member Avatar for Gen.Asura

[QUOTE] I don't know how to do the arbitrary expressions[/QUOTE] There is a lot of literature that discusses how to parse expressions. This is a topic some people spend weeks studying when learning to write compilers. Perhaps you can get an algorithm from Google or Wikipedia.

Member Avatar for Gen.Asura
0
836
Member Avatar for hearty

Do you have specific problems with your code? Or do you have specific questions you'd like to ask about it? [QUOTE]but got stuck in putting the boolean to terminate the program when the values entered by the user are wrong [/QUOTE] Can you high light the area where you are …

Member Avatar for NormR1
0
136
Member Avatar for javaNooblet

Another way to have text be printed on more than one line is to insert a newline character ('\n') in the text at the point you want the following text to start on the next line. "Line 1\nLines 2\nLine 3" will print on 3 lines The println() method automatically adds …

Member Avatar for stultuske
0
267
Member Avatar for upanotch

Can you explain what "messed up" means? What were we supposed to see in the posted image?

Member Avatar for NormR1
0
176
Member Avatar for twazzer

Can you use the Scanner class to read the text file? What package is the SimpleReader class in? Is that something given you by your teacher?

Member Avatar for NormR1
0
227
Member Avatar for asif49

[QUOTE]map multiple values to the same 'person' without creating objects for them each time.[/QUOTE] The Map class would allow you to have many keys refer to the same object. Or you could have an array (or any container) with many of its elements pointing to the same object. [QUOTE]need to …

Member Avatar for NormR1
-1
120
Member Avatar for jhamill

Can you be more specific about your problem. If all your paint() methods are drawing on the same Graphics context, you need to pass each of them the bounds of the box that they can draw in. Your Candidate's paint method needs code to fill in the color and draw …

Member Avatar for NormR1
0
197
Member Avatar for kyriacos1986

[QUOTE]Member class cannot implement Comparable.[/QUOTE] You need to get the correct error messages from the java compiler. Your posted error message does NOT tell you what the problem is. Use the javac command to get the correct error message.

Member Avatar for JamesCherrill
0
181
Member Avatar for Daigan

[QUOTE] but it doesn't loop even if[/QUOTE] Can you show the console from when you execute your code that shows what you input and how the code executed?

Member Avatar for Paul Norris
0
134
Member Avatar for Dersev
Member Avatar for powerdink

[QUOTE]they are of different types (int/int [])[/QUOTE] I'm not sure what your problem is. An element of an int array is an int. What did the API doc for the method you were trying to use say? Did it take an int or an array of int? Please post the …

Member Avatar for JamesCherrill
0
509
Member Avatar for fishStudent

[QUOTE]I can't get the object array in lab9 class (named "thelist") to be populated with objects from the Foreign class[/QUOTE] Please explain. If you get errors, copy the full text of the error messages and paste them here.

Member Avatar for NormR1
0
205
Member Avatar for sike.mausa

Put a println just after the main method header about line 55. [QUOTE]I can't even print[/QUOTE] If you get error messages please post the message here.

Member Avatar for NormR1
0
144
Member Avatar for tygergyrl

Do the project one step at a time. You list 4 things you want to do: opens a file sorts the data saves a file and appends a file Start with the first one. Can you do that ok? If not explain your problem Then go to the second one. …

Member Avatar for StephNicolaou
0
161
Member Avatar for mv740

Check the logic that controls how many numbers are printed on a row/line? Print 5 and then print a newline

Member Avatar for hfx642
0
213
Member Avatar for sidra 100
Re: GUI

[QUOTE]IllegalArgumentException: invalid range properties[/QUOTE] You are creating the JSlider with incorrect values. You will have to post your code if you want any more help.

Member Avatar for NormR1
0
94
Member Avatar for ali11

Many of the problems seem to be explained by the error message. Which of the errors don't you understand? C:\Users\Hamza\Pictures\CalcGUIPanel.java:63: array required, but java.lang.String found cStack.push(buttonOrder[i]); ^ [B]What is buttonOrder? An array or ???[/B] C:\Users\Hamza\Pictures\CalcGUIPanel.java:213: currentValue is already defined in actionPerformed(java.awt.event.ActionEvent) BigInteger currentValue = new BigInteger(cStack.pop()); ^ [B]Remove one of …

Member Avatar for NormR1
0
266
Member Avatar for jalpesh_007

[QUOTE]how can i get label at the co-ordinates where the event has taken place.[/QUOTE] Look at the Container class's API doc. It has some methods that could be useful.

Member Avatar for mKorbel
-1
209
Member Avatar for javaNooblet

[QUOTE]how to get the data that is read from the file and use it in the conversions since some of the data is inputted through dialog boxes[/QUOTE] One way would be to save the data in class variables where all the methods can see it.

Member Avatar for NormR1
0
2K
Member Avatar for ghost135

[QUOTE]i want to make a ftp server in Java[/QUOTE] Have you read the RFC doc for FTP? That describes the protocol. Mainly have a server socket on a certain port and wait for connection. Then in some cases move to another port for the transfers. All discussed in the RFC …

Member Avatar for NormR1
0
181
Member Avatar for anthasuresha

Sounds like high school algebra. Solving an equation with 2 unknowns. A way would be a brute force nested looping program.

Member Avatar for anthasuresha
0
235

The End.