2,777 Posted Topics

Member Avatar for jamesmadison43

If you cast aThat to a DynamicArrayOfInts object, you could then call the class's methods.

Member Avatar for Taywin
0
178
Member Avatar for popeyemissy

> a war event takes place, no points are assigned Where are the events detected? Would that be the place to assign points?

Member Avatar for JamesCherrill
0
313
Member Avatar for adityawkhare

> how can i pass arguments Are you passing the args to a class's constructor or to a method in the class? It is coded the same way: new ClassName(<the args here>); aRefToTheClass.aMethodInClass(<the args here>); See the tutorial: http://docs.oracle.com/javase/tutorial/java/javaOO/arguments.html

Member Avatar for NormR1
0
192
Member Avatar for TheHealer

Not sure why you are using array notation (with []s) in a for statement. Normally an int value is used. Take a look at the tutorial: http://docs.oracle.com/javase/tutorial/java/nutsandbolts/for.html The whole project could be done in one loop: begin loop create button add listener to button add button to container end loop

Member Avatar for NormR1
0
3K
Member Avatar for TheHealer

Can you explain what the code does when it executes and what the problems are? How is the motion of the shape controlled?

Member Avatar for NormR1
0
1K
Member Avatar for summey
Member Avatar for Dane2259

What variable has the null value? Is that variable assigned a value before it is used? If you want any help debugging the problem, you will need to post a small, complete program that compiles, executes and shows the problem. ` while (current1 != null || current2 != null)` This …

Member Avatar for NormR1
0
201
Member Avatar for sharonC

For debugging, You should also print out the values of miniNumber, i and number so you know what the if statement is seeing. What is wrong with what is printed out? What is the correct print out?

Member Avatar for NormR1
0
220
Member Avatar for jaydac12

Also posted at: http://www.javaprogrammingforums.com/whats-wrong-my-code/17907-help-my-library-program-please.html

Member Avatar for jaydac12
0
705
Member Avatar for RozenKristal

> an array, I need to check when it is out of bound The valid indexes for an array range from 0 to the length of the array-1. See this page in the tutorial: http://docs.oracle.com/javase/tutorial/java/nutsandbolts/arrays.html

Member Avatar for jamesmadison43
0
184
Member Avatar for alex.ametrano

Is this your problem: Given a SimpleDate object, how do you get the needed pieces of data from it to create the String you want? Where is the SimpleDate class defined? Do you have API doc for it? What methods does it have that will return the values you want?

Member Avatar for NormR1
0
292
Member Avatar for crownedzero

> in isnt working as it should Please explain what the program does and what "is not working as it should" means. Post the output from the program. How do you test the code? Do you have a small complete program that compiles, excutes and shows the problem?

Member Avatar for JamesCherrill
0
191
Member Avatar for plasticfood

Can you post a small complete program that shows what you are trying to do? Also post the full text of the error messages you ae getting.

Member Avatar for plasticfood
0
218
Member Avatar for crownedzero

It all depends on how you want to pass the data to the recordRowObject class. What does each instance of the class contain? You could use a constructor for example.

Member Avatar for Taywin
0
260
Member Avatar for twazzer

Sounds like you need to debug your code to see why it is not doing what you want. If you don't have an interactive debugger, try using printlns to show the values of the variables that you are using and the execution flow of your code.

Member Avatar for woodenduck
0
3K
Member Avatar for gm.rupert

Here's a place in the tutorials about GUI programming: http://docs.oracle.com/javase/tutorial/uiswing/index.html

Member Avatar for NormR1
0
2K
Member Avatar for Huck44

The tutorial discusses the range of values a primitive can hold: http://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html Have you tried executing those methods to see what values they return? Call the methods with different values and print out the results. If you have any questions about the results, post the print outs that show what …

Member Avatar for stultuske
0
122
Member Avatar for sk8ergirl

Can you post a small complete program that compiles, executes and shows what you want?

Member Avatar for NormR1
0
356
Member Avatar for laguardian

> How do I store the inputs of the user into the array? By using an assignment statement: ` theArray[theIndex] = theValue;`

Member Avatar for NormR1
0
1K
Member Avatar for stlcards007

> give me errors Please copy the full text of the error messages and post them here. Its always a good idea to add an ending else statement to catch the case where none of the above if tests were true. Print out a message .

Member Avatar for JamesCherrill
0
160
Member Avatar for O_mini

Yes, for loops would be the ones to use. Can you explain what your logic for solving the problem is? You should work out the logic to use before writing any code. List the steps the code should take to solve this problem.

Member Avatar for Taywin
0
3K
Member Avatar for jalpesh_007

> but it will also modify the value in map-m1, It sounds like there is a single object that is used as the value in both HashMaps. If you want separate objects with their own values, you need to create them. Copying a reference to an object does not create …

Member Avatar for NormR1
0
360
Member Avatar for regina.elmose

> what I am doing wrong Please explain what happens. If you get errors, copy and paste them here. If the code executes without errors, what does it do? What do you want the program to do?

Member Avatar for Taywin
0
570
Member Avatar for Hemanth.Satkuri

Also posted at: http://www.javaprogrammingforums.com/java-theory-questions/17852-date-time-picker.html#post76428

Member Avatar for NormR1
0
128
Member Avatar for khalidshakar

> after I press that button it causes the program GUI to stop responding Where is the button that is pressed? and where is the GUI that stops?

Member Avatar for JamesCherrill
0
3K
Member Avatar for shibu111

Can you post the full text of the error message that shows where the error happens. Be sure the code in the catch blocks calls the printStackTrace() method so the full error message is printed.

Member Avatar for NormR1
0
36
Member Avatar for Kunal Lakhani

Add more println statements to find where the last statement in the code is executed before the program exit.

Member Avatar for Taywin
0
316
Member Avatar for jalpesh_007

Can you post a small complete program that compiles, executes and show the problem. I don't see where you add anything to the hashmap in the code you posted. Be sure to properly format the code. The posted code does not have proper formattin with all the statements starting in …

Member Avatar for JamesCherrill
-1
1K
Member Avatar for Alsobhi

> figure out my problem in the code. Please explain what the problem is. If you are getting errors, copy the full text of the messages and pasted them here.

Member Avatar for NormR1
0
502
Member Avatar for fariajan.siddiqui

Can you make a small complete program that compiles, executes and shows the problem? Does the code tell the container that the JLabel is added to that it needs to do a new layout of its contents?

Member Avatar for JamesCherrill
0
108
Member Avatar for Fedhell

> times when a destination other then the closest one is selected Could you post some print outs that show the data when this happens? Print the location of the one that was selected and the location of the ones that are closer. Can you post a small complete program …

Member Avatar for NormR1
0
220
Member Avatar for System Networks

Does the classpath point to the folder containing the res folder when the code is executed? Is the res folder(and contents) inside the jar file?

Member Avatar for NormR1
0
265
Member Avatar for bruizer
Member Avatar for NormR1
0
282
Member Avatar for DavidTPotterNY

Check that all the {s have a } that pairs with it. First place to look would be where the error messages start.

Member Avatar for dmanw100
0
2K
Member Avatar for rahul.ch

Take a look at the tutorial: http://docs.oracle.com/javase/tutorial/essential/exceptions/index.html You need to wrap any method that throws an exception in a try{}catch() block.

Member Avatar for NormR1
0
217
Member Avatar for ganges

You could use the Integer class to hold the value of the int. See the API doc of the Integer class for how to use it.

Member Avatar for rubberman
0
72
Member Avatar for Bemani_lover

> it refuses to test it. Does the code compile without errors? BTW Time is the name of a Java SE class. You should try to name your classes with different names.

Member Avatar for Bemani_lover
0
187
Member Avatar for theQube

Please explain what happens when you compile and execute the program. Do you get errors? If so copy the full text and paste here. Is the output from the programn wrong? If so copy the console from when you execute the code and paste it here and add some comments …

Member Avatar for JamesCherrill
0
254
Member Avatar for Neversleepin

> Where can i see them in the properties? Are you asking how to use an IDE to debug your code? If you are asking about a problem with your code, please post the code and ask you questions about it.

Member Avatar for NormR1
0
139
Member Avatar for mikias.kidane.9

Can you post what the program prints out that shows the problem? What code should be executed every time the copy loop goes around and what code should only be executed one time after the copy loop completes? If you are confused about what goes where, post a list of …

Member Avatar for Taywin
0
1K
Member Avatar for im abcd

On windows: To copy the contents of the command prompt window: Click on Icon in upper left corner Select Edit Select 'Select All' - The selection will show Click in upper left again Select Edit and click 'Copy' Paste here.

Member Avatar for im abcd
0
467
Member Avatar for gunvesxco

How do you know if a number is to go to a variable or not? Your example skips over the second 2 and the 0? A regular expression might help you extract the numbers from the String you posted. Also the StreamTokenizer class could work.

Member Avatar for gunvesxco
0
229
Member Avatar for Matth963

> I'm getting the error "Subjects cannot be loaded" The code should always call the printStackTrace() method in catch blocks so you get the full text of the error message. Where does the code assign a value to the variable that has a null value? Is the assignment done before …

Member Avatar for Taywin
0
2K
Member Avatar for godzab

One way would be to loop through the first arraylist's elements one by one and see if the second arraylist contains that element and if it does, remove it. Since there can be more than one match you'd need a loop to continue checking until all were removed. Read the …

Member Avatar for JamesCherrill
0
294
Member Avatar for fmasroor

Can you post code without the numbers at the start of each line? > public void init, That should not compile. Can you explain what you are talking about? main() and applet ??? If you are getting compiler error messages, please copy the full text and paste them here.

Member Avatar for piyush09
0
176
Member Avatar for mrjoli021

@gunvesxco Please start your own thread with your question. This thread is very old.

Member Avatar for NormR1
0
214
Member Avatar for jimmyjhonrubio

Please explain the problem you are having. Post the complete text of any error messages or the program's output and show what you want the output to be.

Member Avatar for JamesCherrill
0
211
Member Avatar for Dev.Waleed

I suggest that you start with a simple editor and use the javac and java commands in a console window before learning how to use an IDE. See the tutorial about how to create some simple programs: http://docs.oracle.com/javase/tutorial/getStarted/cupojava/index.html When you are able to write, compile and execute some simple java …

Member Avatar for stultuske
0
236
Member Avatar for sarah.mathieson.7

> how to get my input from the BufferedReader Look at the BufferedReader class for a method that will return a String when a line is read from the file. Then you can add that String to the TreeSet

Member Avatar for NormR1
0
356
Member Avatar for Tomi1988

> Is there any way to solve this problem? Write a method to do what you want. Not much syntax candy in java. You can't hide the code that needs to be executed.

Member Avatar for JamesCherrill
0
141

The End.