Movatterモバイル変換


[0]ホーム

URL:


Scala 3
3.7.4
LearnInstallPlaygroundFind A LibraryCommunityBlog
Scala 3
LearnInstallPlaygroundFind A LibraryCommunityBlog
DocsAPI
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL
Scala 3/scala/scala.io/StdIn

StdIn

scala.io.StdIn
objectStdIn

Attributes

Source
StdIn.scala
Graph
Supertypes
classObject
traitMatchable
classAny
Self type
StdIn.type

Members list

Value members

Inherited methods

Reads a boolean value from an entire line of the default input.

Reads a boolean value from an entire line of the default input. Has a fairly liberal interpretation of the input.

Attributes

Returns

the boolean value read, or false if it couldn't be converted to a boolean

Throws

java.io.EOFExceptionif the end of the input stream has been reached.

Inherited from:
StdIn (hidden)
Source
StdIn.scala

Reads a byte value from an entire line of the default input.

Reads a byte value from an entire line of the default input.

Attributes

Returns

the Byte that was read

Throws

java.io.EOFExceptionif the end of the input stream has been reached.

java.lang.NumberFormatException if the value couldn't be converted to a Byte

Inherited from:
StdIn (hidden)
Source
StdIn.scala

Reads a char value from an entire line of the default input.

Reads a char value from an entire line of the default input.

Attributes

Returns

the Char that was read

Throws

java.io.EOFExceptionif the end of the input stream has been reached.

java.lang.StringIndexOutOfBoundsException if the line read from default input was empty

Inherited from:
StdIn (hidden)
Source
StdIn.scala

Reads a double value from an entire line of the default input.

Reads a double value from an entire line of the default input.

Attributes

Returns

the Double that was read.

Throws

java.io.EOFExceptionif the end of the input stream has been reached.

java.lang.NumberFormatException if the value couldn't be converted to a Float

Inherited from:
StdIn (hidden)
Source
StdIn.scala

Reads a float value from an entire line of the default input.

Reads a float value from an entire line of the default input.

Attributes

Returns

the Float that was read.

Throws

java.io.EOFExceptionif the end of the input stream has been reached.

java.lang.NumberFormatException if the value couldn't be converted to a Float

Inherited from:
StdIn (hidden)
Source
StdIn.scala

Reads an int value from an entire line of the default input.

Reads an int value from an entire line of the default input.

Attributes

Returns

the Int that was read

Throws

java.io.EOFExceptionif the end of the input stream has been reached.

java.lang.NumberFormatException if the value couldn't be converted to an Int

Inherited from:
StdIn (hidden)
Source
StdIn.scala
defreadLine(text:String,args:Any*):String

Print and flush formatted text to the default output, and read a full line from the default input.

Print and flush formatted text to the default output, and read a full line from the default input. Returnsnull if the end of the input stream has been reached.

Value parameters

args

the parameters used to instantiate the format, as inprintf.

text

the format of the text to print out, as inprintf.

Attributes

Returns

the string read from the default input

Inherited from:
StdIn (hidden)
Source
StdIn.scala

Read a full line from the default input.

Read a full line from the default input. Returnsnull if the end of the input stream has been reached.

Attributes

Returns

the string read from the terminal or null if the end of stream was reached.

Inherited from:
StdIn (hidden)
Source
StdIn.scala

Reads an long value from an entire line of the default input.

Reads an long value from an entire line of the default input.

Attributes

Returns

the Long that was read

Throws

java.io.EOFExceptionif the end of the input stream has been reached.

java.lang.NumberFormatException if the value couldn't be converted to a Long

Inherited from:
StdIn (hidden)
Source
StdIn.scala

Reads a short value from an entire line of the default input.

Reads a short value from an entire line of the default input.

Attributes

Returns

the short that was read

Throws

java.io.EOFExceptionif the end of the input stream has been reached.

java.lang.NumberFormatException if the value couldn't be converted to a Short

Inherited from:
StdIn (hidden)
Source
StdIn.scala
defreadf(format:String):List[Any]

Reads in some structured input (from the default input), specified by a format specifier.

Reads in some structured input (from the default input), specified by a format specifier. See classjava.text.MessageFormat for details of the format specification.

Value parameters

format

the format of the input.

Attributes

Returns

a list of all extracted values.

Throws

java.io.EOFExceptionif the end of the input stream has been reached.

Inherited from:
StdIn (hidden)
Source
StdIn.scala
defreadf1(format:String):Any

Reads in some structured input (from the default input), specified by a format specifier, returning only the first value extracted, according to the format specification.

Reads in some structured input (from the default input), specified by a format specifier, returning only the first value extracted, according to the format specification.

Value parameters

format

format string, as accepted byreadf.

Attributes

Returns

The first value that was extracted from the input

Inherited from:
StdIn (hidden)
Source
StdIn.scala
defreadf2(format:String): (Any,Any)

Reads in some structured input (from the default input), specified by a format specifier, returning only the first two values extracted, according to the format specification.

Reads in some structured input (from the default input), specified by a format specifier, returning only the first two values extracted, according to the format specification.

Value parameters

format

format string, as accepted byreadf.

Attributes

Returns

Ascala.Tuple2 containing the first two values extracted

Inherited from:
StdIn (hidden)
Source
StdIn.scala
defreadf3(format:String): (Any,Any,Any)

Reads in some structured input (from the default input), specified by a format specifier, returning only the first three values extracted, according to the format specification.

Reads in some structured input (from the default input), specified by a format specifier, returning only the first three values extracted, according to the format specification.

Value parameters

format

format string, as accepted byreadf.

Attributes

Returns

Ascala.Tuple3 containing the first three values extracted

Inherited from:
StdIn (hidden)
Source
StdIn.scala
In this article
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL

[8]ページ先頭

©2009-2025 Movatter.jp