I figured it out but do not know how to fix it. What is happening is it wants the value of the next numbers rolled not the ones that are currently on the screen. so if the problem is 7+1 and the...
Type: Posts; User: miller4103
I figured it out but do not know how to fix it. What is happening is it wants the value of the next numbers rolled not the ones that are currently on the screen. so if the problem is 7+1 and the...
I have a math program that generates random numbers but i cannot figure out why the answer always says not correct. My logic seems sound but i might be missing something.
Variable l = new...
It enters a lot of 0's. It does not continue answering the equation tho. Why is that?
the output = 2
I dont want it to round. I want the pie to continue forever until i shut down the program.
I thought big.setscale(BigDecimal.ROUND_CIELING) would continue to count after the decimals with no set...
import java.lang.Math;
import java.math.BigDecimal;
import java.text.NumberFormat;
import java.util.*;
/**
*
*
*/
public class Pie {
This is what i have so far:
System.out.println((big.setScale(BigDecimal.ROUND_CEILING)));
Problem is when i run it i get this error:
Exception in thread "main"...
How do i get my program to keep going until the end is reach of a number? For example 22/7 = pie. How do i get the program to keep giving numbers after pie instead of stoping after 9 or 10 decimal...
I am having a problem. When i input "na" into the textfield it should output na but instead what its doing is giving me a out of range error of 3. My thinking is that it shouldnt do that because the...
PhHein thank you that fixed it. setText was erasing everything so nothing was added.
I have other part of program reading from textField which works fine. My problem is i cannot get the textArea to do the same thing:
ind = TextArea
private void...
Thank you very much for the nudge.
ja.append(add0.substring(0,3)+"-"+add0.substring(3,5)+"-"+add0.substring(5)+"\n");
I have never heard about substrings. What are they. Also i will try a loop right now. I dont know why i didnt think of a loop although i dont know how to get it to do that.
would i use an if-for or...
String ja = textArea;
add0 = input number variable;
I need the input number to be 12345678; (input from user 8 numbers)
but when its output (write to .dat) it gets written as 123-45-678:
How...
When i input a number in my append i need to have 3 - in it. for example when i have this number 12345678 I need it to write to file 123-45-678. I would think i need to use the format thing but need...
Thank you very much that helped. I should have seen that.
I dont understand why you would need to draw a flow chart for that. Now you can Start buy downloading an IDE to help with programming. That would be the first start.
try{
// Open the file that is the first
// command line parameter
FileInputStream fstream = new FileInputStream("Inventory2.dat");
// Get the object of DataInputStream
...
Hi i need some help. I have been using ++ or -- for example i++. The problem is i would like my values to get picked at random thru my array. using ++ or -- is to predictable with what im doing. What...
my writer reader wont save data and add data to the file. When i run it all it does is overwrites the data. code is :
String add = nameField.getText();
String newLine = ("\n");
...
I would like to add to an array from input thru a textfield when the add button is pushed.
array im adding to:
String[] name = {"Stapler", "Pens", "Paper", "Staples"};
I have a gettext...
Thank you very much. I have another problem. Should i make a new thread or continue on using this one?
Thanks norm i know its in there somewear and i looked but i cannot find it. Can you narrow it down some?
How would i do that? I need to be able to type in a string in the SearchField and when it equals lets say Stapler i need it to show some information. how do i get whats in the JTextField to compare...
It could be because im tired but i dont see where el is declared.