Hi,
I'm currently having a problem with my code... I am trying to output to a file numerous transactions that have took place.
if (userInput == 1)
{
System.out.println("The...
Type: Posts; User: iCurtisIT
Hi,
I'm currently having a problem with my code... I am trying to output to a file numerous transactions that have took place.
if (userInput == 1)
{
System.out.println("The...
Is there a way of doing it without using an Array?
Thank you for your advice. I will try all of the things mentioned and get back to you. I thought learning Spanish was hard, Java is something else.
Do you mean this?
Exception in thread "main" java.util.NoSuchElementException
at java.util.Scanner.throwFor(Unknown Source)
at java.util.Scanner.next(Unknown Source)
at...
Hello. I have asked other questions about this, but keep running into more things I do not understand.
The above blocks of text (Each Unit), carries on until Unit 13.
I have the following code,...
When you mention the split() method, would that mean that I am using array's? Is there anyway of reading the data and assigning each value to a variable to do a calculation for each line considering...
Thank you Sir. I do appreciate all your help. I will let you know how I get on. Thanks again.
Ok. Thank you. I will try this now and get back to you. Thanks again!
--- Update ---
OK. I sort of understand the nextLine() method.
I need to know how to break a line into two so we can...
I really don't understand what you are saying. Argh, this is so frustrating.
EDIT: OK I understand now. You are saying my code is reading it as it comes, not line by line. Why have you said use...
My code isn't right. I am not doing it right. I do not know what I am doing. I know how to read lets say 4 different numbers from a text file (5 6 30 500), but what I don't know how to do it read...
Hello All.
I am having trouble reading data from a text file. I want to read a bit of text, store it (to manipulate later), then do this with each block of text.
Once all the data has been...
Sorry if it does not make sense, I am sort of new to all of this.
I have to do calculations with the data from the input file. The input file is laid out as:
Shop A (Shop A)
NoOfStaff (6)...
while (inFile.hasNextDouble())
{
if (inFile.hasNext())
{
number_of_staff = inFile.nextDouble();
hours_worked = inFile.nextDouble();
pay_rate = inFile.nextDouble();...
Hello, I am wondering if someone can help me with a problem I have.
I am using the hasNext() method to read from a file. I have multiple parts in the text file.
Shop A
NoOfStaff
HoursWorked...
I'm struggling to understand how I put the 7 lines of text (systemout) and the other statements in the same one box. Am I wrong to say if I put JOptionPane for each time I've put System.out, won't it...
This is the end of my code. It is for some sort of calculator. The only thing I am struggling with is "outputting it to a dialog box instead of having it output at the bottom of the eclipse screen"....
Hey guys.
I have multiple System.out.println, 7 to be precise. The last 4 are in a if, else if, else statement. How can I put all of this into one dialog box?
Thanks in advanced.
Curtis H.
Thank you. Just had a look and it looks very helpful. Will get stuck in to it all later on this evening! Thanks again.
Hello :)
Well I'm new to all this Java stuff. I'm doing it as one of my modules in my degree.
I have watched various videos and read the odd book, but to be honest none of it makes much sense...
Thank you very much. I just tried something similiar but I kept on getting errors. I am new to this so, so may ask a few more very basic questions, hehe.
Thanks again. Appreciate it.
Hey!
I don't know if this query is in the correct place. If it isn't, sorry, and could someone please move it.
I am making a Volume calculator as my first piece of coursework and I need the...
Hello everyone!
My name is Curtis, and I have just started a Cyber Security Degree in Liverpool, UK. One of my modules is Computer Programming and I am very new to all of this. During my first...