English 中文(简体)
内容提要
原标题:Scanner to TextIO question

I need to add a value and input it directly into an array using TextIO. I know that if I was using Scanner I would use the in.nextDouble() function, but how would I do it using TextIO?

 TextIO.put("Enter credit hours:");
 creditHour[sem][grd]+=in.nextDouble(); //I have to use TextIO here.

提前感谢,

问题回答

创立。

[阵列][r] = 文本IO.getlnDouble();





相关问题
Trump cards matching game

Shuffle cards in 4x13 rows and colums colums Ax4 and rows 1x13 user input row and colums A,1-A,4-A,14-respestively if user input wrong display message and input again find all the macthing and ends ...

Java InputStream != Readable

I am using java.util.Scanner for things such as nextInt(), and all was working fine as long as I was using a java.lang.Readable (one and only constructor argument). However, when I changed to using an ...

How to scan a file in a different directory in java?

How do you scan a file with java that isn t in the directory the java file is in? For example: The java file is located at "C:FilesJavaFiles est.java" However, the file I want to scan is located ...

Extract Integer Part in String

What is the best way to extract the integer part of a string like Hello123 How do you get the 123 part. You can sort of hack it using Java s Scanner, is there a better way?

Is there a mono (.Net) equivalent to the Scanner-class in Java

In Java there is a nice class called Scanner for reading strings and streams of a certain format to data-structures like integers, floats,... Is there any equivalent in Mono? In .Net there is a binary-...

How do i input a string from a buffered reader?

Im used too using Scanner mainly and want too try using a buffered reader: heres what i have so far import java.util.*; import java.io.*; public class IceCreamCone { // variables String flavour; int ...

Java server-client | server wont receive second request

I m trying to write a client and time server for an assignment and I m having trouble getting the server to receive the second request from the client. The first request goes through fine without a ...

Why doesn t this for-loop let me input text the first cycle?

What I want to do is ask the user for a number of strings to read into an array, and then ask the user to input that number of strings and read them into the array. When I run this code it never asks ...

热门标签