java 17

java 17

Write a java program to accept different types of inputs in a line at time from the keyboard(like name,age,salary,gender) just like one can do using scanf() in c (using String tokenizer).

View Answers

August 23, 2011 at 4:14 PM

import java.io.*;
import java.util.*;
 class InputValues{   
   public static void main( String [] args )throws Exception{
       BufferedReader br = new BufferedReader( new InputStreamReader(System.in));
       System.out.println("Enter string that contains name, age, salary and gender separated by comma(,): ");
       String input = br.readLine();
       StringTokenizer st = new StringTokenizer(input, ",");
       String name=st.nextToken();
       int age=Integer.parseInt(st.nextToken());
       int salary=Integer.parseInt(st.nextToken());
       String gender=st.nextToken();
        System.out.println();
       System.out.println("Name: "+name);
       System.out.println("Age: "+age);
       System.out.println("Salary: "+salary);
       System.out.println("Gender: "+gender);
   }
 }









Related Tutorials/Questions & Answers:
java 17
java 17  Write a java program to accept different types of inputs in a line at time from the keyboard(like name,age,salary,gender) just like one can do using scanf() in c (using String tokenizer
Java/JDK 17 tutorials
Java/JDK 17 Tutorials In this section we are providing you Java 17 tutorials and you will learn Java 17 programming language in detail. The Java 17 is being... and projects based on the Java 17. These tutorials will help you in learning
Advertisements
Java 17 Features
Java 17 Features - Exploring the features of JDK17/Java 17 In this section we are discussing Java 17 features with many articles and example code. Java/JDK 17 will be released as long-term support (LTS) version of Java which
Upcoming features of Java 17
Exploring the features of upcoming Java 17, which is scheduled to be released... and it will be obsolete once Java 17 is released in September 2021. People... to explore the new features of Java 17, which is coming in September 2021. Here
Maven dependency for com.cedarsoft - open version 17 is released. Learn to use open version 17 in Maven based Java projects
- open version 17 ) in their Java project if it is based on Maven and Gradle...; com.cedarsoft - open version 17 in Java projects. Follow the step by step... and includes  com.cedarsoft - open version 17 java library in your
Maven dependency for org.openjfx - javafx-fxml version 17 is released. Learn to use javafx-fxml version 17 in Maven based Java projects
( org.openjfx - javafx-fxml version 17 ) in their Java project if it is based... in project? Steps to use  org.openjfx - javafx-fxml version 17 in Java projects... - javafx-fxml version 17 java library in your project. ADS_TO_REPLACE_2 Now you
Maven dependency for org.openjfx - javafx-media version 17 is released. Learn to use javafx-media version 17 in Maven based Java projects
this version ( org.openjfx - javafx-media version 17 ) in their Java project... in project? Steps to use  org.openjfx - javafx-media version 17 in Java...; org.openjfx - javafx-media version 17 java library in your project. ADS_TO_REPLACE_2
Maven dependency for com.indeed - common-parent version 17 is released. Learn to use common-parent version 17 in Maven based Java projects
this version ( com.indeed - common-parent version 17 ) in their Java project... that downloads and includes  com.indeed - common-parent version 17 java library...Maven dependency for  com.indeed  - Version 17 of common-parent
Maven dependency for org.basepom - basepom-minimal version 17 is released. Learn to use basepom-minimal version 17 in Maven based Java projects
this version ( org.basepom - basepom-minimal version 17 ) in their Java project... version 17 in Java projects. Follow the step by step tutorial for using the latest... and includes  org.basepom - basepom-minimal version 17 java library
Exercise 17
Exercise 17  Character Counter Write a program which takes an input string and determines the number of vowels, consonants, digits, and special characters (i.e., all other nonalphanumeric characters) in the string
Maven dependency for org.openjfx - javafx-media version 17-ea+17 is released. Learn to use javafx-media version 17-ea+17 in Maven based Java projects
this version ( org.openjfx - javafx-media version 17-ea+17 ) in their Java... version 17-ea+17 in Java projects. Follow the step by step tutorial for using...Maven dependency for  org.openjfx  - Version 17-ea+17 of javafx
Maven dependency for org.openjfx - javafx-fxml version 17-ea+17 is released. Learn to use javafx-fxml version 17-ea+17 in Maven based Java projects
this version ( org.openjfx - javafx-fxml version 17-ea+17 ) in their Java project... version 17-ea+17 in Java projects. Follow the step by step tutorial for using... that downloads and includes  org.openjfx - javafx-fxml version 17-ea+17 java
How to install JDK 17 on Windows 10
to learn Java 17. How to install JDK 17 on Windows 10? After that I want to make programs in Java and JDK 17. Thanks   Hi, First of all you have.../downloads/ Then you can run the installer on your machine to install Java/JDK 17
How to install JDK 17 on Windows 10
to learn Java 17. How to install JDK 17 on Windows 10? After that I want to make programs in Java and JDK 17. Thanks   Hi, First of all you have.../downloads/ Then you can run the installer on your machine to install Java/JDK 17
How to install JDK 17 on Windows 10
to learn Java 17. How to install JDK 17 on Windows 10? After that I want to make programs in Java and JDK 17. Thanks   Hi, First of all you have.../downloads/ Then you can run the installer on your machine to install Java/JDK 17
com.marvelution - marvelution version 17 Maven dependency. How to use marvelution version 17 in pom.xml?
version 17 ) in their Java project if it is based on Maven and Gradle. Table... and includes  com.marvelution - marvelution version 17 java library in your...com.marvelution  - Version 17 of marvelution Maven dependency? How
com.nesscomputing - ness-oss-parent version 17 Maven dependency. How to use ness-oss-parent version 17 in pom.xml?
( com.nesscomputing - ness-oss-parent version 17 ) in their Java project...; com.nesscomputing - ness-oss-parent version 17 in Java projects. Follow the step... and includes  com.nesscomputing - ness-oss-parent version 17 java library in your
org.jboss - jboss-parent version 17 Maven dependency. How to use jboss-parent version 17 in pom.xml?
can use this version ( org.jboss - jboss-parent version 17 ) in their Java...; org.jboss - jboss-parent version 17 in Java projects. Follow the step by step... that downloads and includes  org.jboss - jboss-parent version 17 java
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for oss-parent version 17
version 17. You can add these depency in your project to get com.indeed:oss-parent:17 Java library in your project.. Maven, Gradle, SBT, Ivy, Grape, Leiningen and  Buildr Dependency for oss-parent version 17 In this section have
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for ness-oss-parent version 17
-parent version 17. You can add these depency in your project to get com.nesscomputing:ness-oss-parent:17 Java library in your project.. Maven, Gradle, SBT, Ivy, Grape, Leiningen and  Buildr Dependency for ness-oss-parent version 17
CSS get variables finally after 17 years
CSS get variables finally after 17 years - Now use variables in CSS document In this tutorial you will know about the CSS and how it has become possible... concept with the same and now after 17 years, one can put variables
Maven Dependency open >> 17
Maven Dependency marvelution >> 17
Maven Dependency commons-parent >> 17
Maven Dependency oss-parent >> 17
java run time error - Java Beginners
java run time error  i am getting error "main... :SGM :TP INDEL4 2 28 12:41 0 23 08:17 0 23 08:17 2 28 12:52 0 23 08:17 0 23 08:17 INPPG6 0 23 08:17 0 23 08:17 0 23 08:17 0 23 08:17 0
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for java-opentimestamps version 1.7
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for java-opentimestamps version 1.7. You can add these depency in your project to get com.eternitywall:java-opentimestamps:1.7 Java library in your project.. Maven, Gradle
Maven dependency for com.cedarsoftware - java-util version 1.16.0 is released. Learn to use java-util version 1.16.0 in Maven based Java projects
Maven dependency for  com.cedarsoftware  - Version 1.16.0 of java-util released The developers of   com.cedarsoftware - java-util project have released the latest version of this library on 17 Jan 2015, the released
Maven dependency for com.cedarsoftware - java-util version 1.19.3 is released. Learn to use java-util version 1.19.3 in Maven based Java projects
Maven dependency for  com.cedarsoftware  - Version 1.19.3 of java-util released The developers of   com.cedarsoftware - java-util project have released the latest version of this library on 17 May 2015, the released
Maven dependency for com.cedarsoftware - java-util version 1.13.0 is released. Learn to use java-util version 1.13.0 in Maven based Java projects
Maven dependency for  com.cedarsoftware  - Version 1.13.0 of java-util released The developers of   com.cedarsoftware - java-util project have released the latest version of this library on 17 Nov 2014, the released
Maven dependency for com.amazonaws - jmespath-java version 1.11.956 is released. Learn to use jmespath-java version 1.11.956 in Maven based Java projects
-java released The developers of   com.amazonaws - jmespath-java project have released the latest version of this library on 17 Feb 2021, the released version of  com.amazonaws - jmespath-java library is 1.11.956. Developer
Maven dependency for com.amazonaws - jmespath-java version 1.11.976 is released. Learn to use jmespath-java version 1.11.976 in Maven based Java projects
-java released The developers of   com.amazonaws - jmespath-java project have released the latest version of this library on 17 Mar 2021, the released version of  com.amazonaws - jmespath-java library is 1.11.976. Developer
Maven dependency for com.stripe - stripe-java version 20.39.0 is released. Learn to use stripe-java version 20.39.0 in Maven based Java projects
Maven dependency for  com.stripe  - Version 20.39.0 of stripe-java released The developers of   com.stripe - stripe-java project have released the latest version of this library on 17 Feb 2021, the released version
Maven dependency for com.amazonaws - jmespath-java version 1.12.8 is released. Learn to use jmespath-java version 1.12.8 in Maven based Java projects
-java released The developers of   com.amazonaws - jmespath-java project have released the latest version of this library on 17 Jun 2021, the released version of  com.amazonaws - jmespath-java library is 1.12.8. Developer can
Maven dependency for com.stripe - stripe-java version 20.57.0 is released. Learn to use stripe-java version 20.57.0 in Maven based Java projects
Maven dependency for  com.stripe  - Version 20.57.0 of stripe-java released The developers of   com.stripe - stripe-java project have released the latest version of this library on 17 Jun 2021, the released version
Maven dependency for com.iyzipay - iyzipay-java version 2.0.25 is released. Learn to use iyzipay-java version 2.0.25 in Maven based Java projects
Maven dependency for  com.iyzipay  - Version 2.0.25 of iyzipay-java released The developers of   com.iyzipay - iyzipay-java project have released the latest version of this library on 17 Aug 2016, the released
Maven dependency for com.amazonaws - jmespath-java version 1.12.180 is released. Learn to use jmespath-java version 1.12.180 in Maven based Java projects
-java released The developers of   com.amazonaws - jmespath-java project have released the latest version of this library on 17 Mar 2022, the released version of  com.amazonaws - jmespath-java library is 1.12.180. Developer
Maven dependency for org.openrewrite - rewrite-java version 7.33.0 is released. Learn to use rewrite-java version 7.33.0 in Maven based Java projects
-java released The developers of   org.openrewrite - rewrite-java project have released the latest version of this library on 17 Nov 2022, the released version of  org.openrewrite - rewrite-java library is 7.33.0. Developer
Maven dependency for org.openrewrite - rewrite-java version 7.33.0 is released. Learn to use rewrite-java version 7.33.0 in Maven based Java projects
-java released The developers of   org.openrewrite - rewrite-java project have released the latest version of this library on 17 Nov 2022, the released version of  org.openrewrite - rewrite-java library is 7.33.0. Developer
Maven dependency for com.stripe - stripe-java version 22.0.0 is released. Learn to use stripe-java version 22.0.0 in Maven based Java projects
Maven dependency for  com.stripe  - Version 22.0.0 of stripe-java released The developers of   com.stripe - stripe-java project have released the latest version of this library on 17 Nov 2022, the released version
Maven dependency for com.amazonaws - jmespath-java version 1.12.344 is released. Learn to use jmespath-java version 1.12.344 in Maven based Java projects
-java released The developers of   com.amazonaws - jmespath-java project have released the latest version of this library on 17 Nov 2022, the released version of  com.amazonaws - jmespath-java library is 1.12.344. Developer
Maven dependency for com.amazonaws - jmespath-java version 1.11.56 is released. Learn to use jmespath-java version 1.11.56 in Maven based Java projects
-java released The developers of   com.amazonaws - jmespath-java project have released the latest version of this library on 17 Nov 2016, the released version of  com.amazonaws - jmespath-java library is 1.11.56. Developer
Maven dependency for com.amazonaws - jmespath-java version 1.11.92 is released. Learn to use jmespath-java version 1.11.92 in Maven based Java projects
-java released The developers of   com.amazonaws - jmespath-java project have released the latest version of this library on 17 Feb 2017, the released version of  com.amazonaws - jmespath-java library is 1.11.92. Developer
Maven dependency for com.amazonaws - jmespath-java version 1.11.79 is released. Learn to use jmespath-java version 1.11.79 in Maven based Java projects
-java released The developers of   com.amazonaws - jmespath-java project have released the latest version of this library on 17 Jan 2017, the released version of  com.amazonaws - jmespath-java library is 1.11.79. Developer
Maven dependency for com.amazonaws - jmespath-java version 1.11.130 is released. Learn to use jmespath-java version 1.11.130 in Maven based Java projects
-java released The developers of   com.amazonaws - jmespath-java project have released the latest version of this library on 17 May 2017, the released version of  com.amazonaws - jmespath-java library is 1.11.130. Developer
Maven dependency for com.amazonaws - jmespath-java version 1.11.150 is released. Learn to use jmespath-java version 1.11.150 in Maven based Java projects
-java released The developers of   com.amazonaws - jmespath-java project have released the latest version of this library on 17 Jun 2017, the released version of  com.amazonaws - jmespath-java library is 1.11.150. Developer
Maven dependency for com.amazonaws - jmespath-java version 1.11.179 is released. Learn to use jmespath-java version 1.11.179 in Maven based Java projects
-java released The developers of   com.amazonaws - jmespath-java project have released the latest version of this library on 17 Aug 2017, the released version of  com.amazonaws - jmespath-java library is 1.11.179. Developer
Maven dependency for com.amazonaws - jmespath-java version 1.11.214 is released. Learn to use jmespath-java version 1.11.214 in Maven based Java projects
-java released The developers of   com.amazonaws - jmespath-java project have released the latest version of this library on 17 Oct 2017, the released version of  com.amazonaws - jmespath-java library is 1.11.214. Developer
Maven dependency for com.amazonaws - jmespath-java version 1.11.231 is released. Learn to use jmespath-java version 1.11.231 in Maven based Java projects
-java released The developers of   com.amazonaws - jmespath-java project have released the latest version of this library on 17 Nov 2017, the released version of  com.amazonaws - jmespath-java library is 1.11.231. Developer
Maven dependency for com.amazonaws - jmespath-java version 1.11.280 is released. Learn to use jmespath-java version 1.11.280 in Maven based Java projects
-java released The developers of   com.amazonaws - jmespath-java project have released the latest version of this library on 17 Feb 2018, the released version of  com.amazonaws - jmespath-java library is 1.11.280. Developer

Ads