SlideShare a Scribd company logo
1 of 1
import java.util.Scanner;
class TestRevised {
public void menu() {
Scanner scanner = new Scanner(System.in);
System.out.print("Enter a sentence:t");
String sentence = scanner.nextLine();
System.out.print("Enter an index:t");
int index = scanner.nextInt();
System.out.println("nYour sentence:t" + sentence);
System.out.println("Your index:t" + index);
}
}

More Related Content

What's hot

Data binding in AngularJS, from model to view
Data binding in AngularJS, from model to viewData binding in AngularJS, from model to view
Data binding in AngularJS, from model to viewThomas Roch
 
6nullables in c#
6nullables in c#6nullables in c#
6nullables in c#Sireesh K
 
Evolution of asynchrony in (ASP).NET
Evolution of asynchrony in (ASP).NETEvolution of asynchrony in (ASP).NET
Evolution of asynchrony in (ASP).NETAliaksandr Famin
 
Reactive Extensions for .NET
Reactive Extensions for .NETReactive Extensions for .NET
Reactive Extensions for .NETAndrei Marukovich
 
lab stack and queue.docx
lab stack and queue.docxlab stack and queue.docx
lab stack and queue.docxR S Anu Prabha
 
WAP to find out whether the number is prime or not in java
WAP to find out whether the number is prime or not in javaWAP to find out whether the number is prime or not in java
WAP to find out whether the number is prime or not in javaOne97 Communications Limited
 
cats.effect.IO - Scala Vienna Meetup February 2019
cats.effect.IO - Scala Vienna Meetup February 2019cats.effect.IO - Scala Vienna Meetup February 2019
cats.effect.IO - Scala Vienna Meetup February 2019Daniel Pfeiffer
 
Linklist Creation
Linklist CreationLinklist Creation
Linklist CreationSwarup Saha
 
Angular & RXJS: examples and use cases
Angular & RXJS: examples and use casesAngular & RXJS: examples and use cases
Angular & RXJS: examples and use casesFabio Biondi
 
New Microsoft Word Document.doc
New Microsoft Word Document.docNew Microsoft Word Document.doc
New Microsoft Word Document.docbutest
 
Be smart when testing your Akka code
Be smart when testing your Akka codeBe smart when testing your Akka code
Be smart when testing your Akka codeMykhailo Kotsur
 
An Introduction to RxJava
An Introduction to RxJavaAn Introduction to RxJava
An Introduction to RxJavaSanjay Acharya
 

What's hot (17)

queue
queuequeue
queue
 
Data binding in AngularJS, from model to view
Data binding in AngularJS, from model to viewData binding in AngularJS, from model to view
Data binding in AngularJS, from model to view
 
Test Program - Basic operators
Test Program - Basic operatorsTest Program - Basic operators
Test Program - Basic operators
 
6nullables in c#
6nullables in c#6nullables in c#
6nullables in c#
 
Evolution of asynchrony in (ASP).NET
Evolution of asynchrony in (ASP).NETEvolution of asynchrony in (ASP).NET
Evolution of asynchrony in (ASP).NET
 
Reactive Extensions for .NET
Reactive Extensions for .NETReactive Extensions for .NET
Reactive Extensions for .NET
 
lab stack and queue.docx
lab stack and queue.docxlab stack and queue.docx
lab stack and queue.docx
 
WAP to find out whether the number is prime or not in java
WAP to find out whether the number is prime or not in javaWAP to find out whether the number is prime or not in java
WAP to find out whether the number is prime or not in java
 
cats.effect.IO - Scala Vienna Meetup February 2019
cats.effect.IO - Scala Vienna Meetup February 2019cats.effect.IO - Scala Vienna Meetup February 2019
cats.effect.IO - Scala Vienna Meetup February 2019
 
Rxandroid
RxandroidRxandroid
Rxandroid
 
Java 8 Intro - Core Features
Java 8 Intro - Core FeaturesJava 8 Intro - Core Features
Java 8 Intro - Core Features
 
Linklist Creation
Linklist CreationLinklist Creation
Linklist Creation
 
Stacks
StacksStacks
Stacks
 
Angular & RXJS: examples and use cases
Angular & RXJS: examples and use casesAngular & RXJS: examples and use cases
Angular & RXJS: examples and use cases
 
New Microsoft Word Document.doc
New Microsoft Word Document.docNew Microsoft Word Document.doc
New Microsoft Word Document.doc
 
Be smart when testing your Akka code
Be smart when testing your Akka codeBe smart when testing your Akka code
Be smart when testing your Akka code
 
An Introduction to RxJava
An Introduction to RxJavaAn Introduction to RxJava
An Introduction to RxJava
 

Viewers also liked (20)

Juicio3
Juicio3Juicio3
Juicio3
 
Juicio1
Juicio1Juicio1
Juicio1
 
Juicio2
Juicio2Juicio2
Juicio2
 
Juicio4
Juicio4Juicio4
Juicio4
 
Smarter city
Smarter citySmarter city
Smarter city
 
Condi Rice Paper
Condi Rice PaperCondi Rice Paper
Condi Rice Paper
 
Christopher Manning of Cape Cod Hotel Owner
Christopher Manning of Cape Cod Hotel OwnerChristopher Manning of Cape Cod Hotel Owner
Christopher Manning of Cape Cod Hotel Owner
 
La inmunohistoquimica
La inmunohistoquimicaLa inmunohistoquimica
La inmunohistoquimica
 
Portfolio Kalea Logística
Portfolio Kalea LogísticaPortfolio Kalea Logística
Portfolio Kalea Logística
 
Tupa2012
Tupa2012Tupa2012
Tupa2012
 
Sepinar psp sd iii
Sepinar psp   sd iiiSepinar psp   sd iii
Sepinar psp sd iii
 
Scenario quiz
Scenario quizScenario quiz
Scenario quiz
 
Reglamento Red Internacional de Negocios TI "ArgenTIna IT"
Reglamento Red Internacional de Negocios TI "ArgenTIna IT"Reglamento Red Internacional de Negocios TI "ArgenTIna IT"
Reglamento Red Internacional de Negocios TI "ArgenTIna IT"
 
amplify GmbH A+ Content Tool
amplify GmbH A+ Content Toolamplify GmbH A+ Content Tool
amplify GmbH A+ Content Tool
 
Florencia
FlorenciaFlorencia
Florencia
 
Ppt ptik grab car&uber
Ppt ptik grab car&uberPpt ptik grab car&uber
Ppt ptik grab car&uber
 
Plantas Carnivoras
Plantas CarnivorasPlantas Carnivoras
Plantas Carnivoras
 
Edwin aguilar
Edwin  aguilarEdwin  aguilar
Edwin aguilar
 
Cronograma segundo periodo 2012 (2)
Cronograma segundo periodo 2012 (2)Cronograma segundo periodo 2012 (2)
Cronograma segundo periodo 2012 (2)
 
Fotografía de página completa.pdf7
Fotografía de página completa.pdf7Fotografía de página completa.pdf7
Fotografía de página completa.pdf7
 

Example

  • 1. import java.util.Scanner; class TestRevised { public void menu() { Scanner scanner = new Scanner(System.in); System.out.print("Enter a sentence:t"); String sentence = scanner.nextLine(); System.out.print("Enter an index:t"); int index = scanner.nextInt(); System.out.println("nYour sentence:t" + sentence); System.out.println("Your index:t" + index); } }