Oh wow thats a good idea, I'll try that out thanks.
Type: Posts; User: lordofrandom
Oh wow thats a good idea, I'll try that out thanks.
This is a bit difficult to explain but I am writing a program that allows the user to write to a text file using randomaccessfile. The user enters name, age, and address, and each of these items is...
I am writing to a RandomAccessFile. When I try to do raf.writeBytes("") the textfile ignores this empty string and just removes it from the file. Is there a way so that the textfile will save this...
if you are converting strings to Doubles by using Double.parseDouble(string), how can you compare them numerically ( >, <, ==) with other Doubles? Is there a way to convert Doubles to primitive...
Hi, I wrote a database program that works perfectly fine on my home computer with Java 1.7. However, when I run the same exact code on my school computer there is a problem with overwriting a text...
Oh...yeah I completely forgot about String.split. Thanks a lot!
Hi, I am having some trouble with reading a line at a specific point. For example I have several lines of data similar to this:
Talsma,Tegan,743448,F,4F1,4K2,S4,950805,9051726485
I want the...
This works
DecimalFormat df=new DecimalFormat("#.00");
I found part of the problem, it doesn't add 2 decimal places if there is only 1 decimal place. 8.5 doesn't turn into 8.50. I just need a way to add a 0 if it has only 1 decimal place
This is the output:
Employee Payroll (Sorted by last name)
F.Name L.Name Hourly Wage Hours Worked Gross Pay 20% Tax Net Pay
Paul Allen $21.50 ...
Employee Payroll (Sorted by last name)
F.Name L.Name Hourly Wage Hours Worked Gross Pay 20% Tax Net Pay
Paul Allen $21.50 34 731.0 ...
import java.util.Formatter;
import java.util.*;
import java.text.DecimalFormat;
public class program5c
{
static DecimalFormat df=new DecimalFormat("#.##"); ...
Thanks a lot, sir.
Hi, I am using a bubble sort algorithm to sort a 2D array. The array is as follows:
String data[][] = {{"John", "Smith", "14.75", "30", "ZZZZ", "ZZZZ", "ZZZZ",},{"Bill", "Gates", "18.50",...
import java.util.Scanner;
public class program4f_4
{
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
System.out.println("Enter a string to...
Oh wow I'm an idiot
I have to print 'value' not maximum, thanks.
I just got introduced to methods and functions, and I have to use them to find the max of two integers entered by the user. Below is my code and the error I get is "cannot find symbol - variable...