Skip to content
Advertisement

Tag: input

NoSuchElementException Problem in User Input Java

I’m confused while using an Java program I created. Initially, when a user Ctrl+D during the input, it will promptly end the program and display an error in the form of this, Doing a bit of research I note that Ctrl+D terminates the input of sort. Therefore, I tried add few more lines to my codes to prevent the error

JFrame.addMouseListener doesn’t register clicks

I am currently writing an application in java that needs to take in input from the user. I have tried many ways to implement the input but none of them work. I am rendering objects with the graphics interface if that helps. I have tried a couple of methods to implement mouse interaction: And However when I run the application

Using both FileInputStream and FileOutputStream

I am stuck on my problem where I have to read a file given by the user and then calculate names, grades, and such. But the issue I am having is that I need to take that data and store it in a text file names report.txt and then take the data from the first file and then compute the

Remove delay while pressing the second key LWJGL Java

I am running into a problem that I cannot find any solution for the moment even by searching on the internet. I am currently working on a 2D game and I want my player to go on every direction and diagonally. For that reason I need to get two inputs from the keyboard, thing that I could code but now

Java how to read stdin?

I need to read the input that is piped to my java program. This is a simple task but I couldn’t find it on the net. This is what I tried: First of all, is there a simpler way to do it (in java 11, or maybe with a library)? It seems like a lot of lines for such a

Java repeated letter check in string

I’m having problem figuring out how to check from users input letters that were repeated. Program needs to output repeated letter as true and if there isn’t any then as false. Program should not count numbers or symbols as repeated. For example: User input: Chocolate Program Output: True User input: 112 cream Program Output: False Answer Here is another version,

Unique regex for first name and last name

I have a single input where users should enter name and surname. The problem is i need to use checking regEx. There’s a list of a requirements: The name should start from Capital Letter (not space) There can’t be space stacks It’s obligate to support these Name and Surname (all people are able to write theirs first/name). Example: And the

Advertisement