Scratch for Java

Sprite::ask()

Asks a question and waits for an answer to be typed in. The question appears at the top of the stage.

Unlike Scratch, this does not pause the sprite. run() keeps being called while the question is on screen, so check isAsking() or wait for getAnswer() to change.

Syntax

Java

.ask(question)

Scratch

ask [question] and wait

Parameters

Name Data Type Description
question String the question to show

Return

void

ask()

Create Shareable URL

Select Sections