I am creating a Currency converter using BigDecimal and now I am suck with an issue. I have a user-defined number - "Amount" (this is the amount of c ...
I am creating a Currency converter using BigDecimal and now I am suck with an issue. I have a user-defined number - "Amount" (this is the amount of c ...
Let me know please if i can be more specific. I've tried multiplying and dividing but haven't been able to figure anything out. ...
I'm new to Java so apologies in advance. I need to scan through a .txt file where each line is a set of names, and if a name is present anywhere in a ...
I'm creating a method that makes the user choose what he wants to do through 2 choices associated with numbers. In case the user inserts any string in ...
I have a user input validate function: The code will repeat Input invalid, please retry:Input invalid, please retry:Input invalid, please retry ...
I am trying to write to a file using BufferedWriter. As the write method takes int argument, I am casting input of double type into int type but it is ...
So I've tried adding count ++ in multiple places in my code along with researching some way to allow multiple inputs to no avail. Am I missing somethi ...
I created a class in java, but not getting how to take a value for the variables from the user as i find an error while importing util package. code: ...
I'm working on a project and have to use the scanner for user input. If given the text file "names.txt" and each file was like such Mike John Johnny ...
I want to use a while loop to check if the user entered their guess and if nothing was entered reprompt them to enter it. I am new to Java sorry if th ...
I'm new to Java and i was learning inputs with Scanner but i'm getting something odd, the message of "enter a number" doesn't show, it only appears af ...
I am trying to get the following to work: Imagine the input via the scanner class is this: new 10 32 I want to store these values into two sep ...
I have to write a Java program with do while loop. Basically it's like self-checkout register in grocery stores. At first program prompts user to ente ...
My calculator, that I needed to make for my test task to apply for a Java course, is working great. But there's an issue I would like to resolve. If y ...
I am trying to solve a question on the online platform of Infosys Ltd InfyTQ platform. The problem is in java. The problem description is as follows: ...
I want to read in lines from a .txt file. However while the file is found, I can't access its content. import java.io.*; import java.*; import java.s ...
I asks the user to put 2 key pairs then I removed the last pair the user entered I ask for another pair and added it into the hashmap now, I ...
I am writing a program that requires that I use java command line arguments to open a file and find some information within that file. The files we wa ...
I have a data file that consists of a calorie count. the calorie count it separated by each elf that owns it and how many calories are in each fruit. ...
I am tryin to take user input in a parameterized java constructor but I am failing. It gives the following error Here is my code ...