Latest Tutorials| Questions and Answers|Ask Questions?|Site Map




Have Programming Question? Ask it here!
 
 
 


mayank parmar
learn
1 Answer(s)      3 years and a month ago
Posted in : Java Beginners


how to input value in java


Advertisement
View Answers

March 16, 2011 at 11:20 AM


You can use Scanner class, BufferedReader class to input values.

Here is an example:

import java.util.*;
class  ScannerExample
{
    public static void main(String[] args) 
    {
        Scanner input=new Scanner(System.in);
        System.out.print("Enter integer: ");
        int i=input.nextInt();
        System.out.print("Enter double: ");
        double d=input.nextDouble();
        System.out.print("Enter float: ");
        float f=input.nextFloat();
        System.out.print("Enter string: ");
        String s=input.next();
        System.out.println(i);
        System.out.println(d);
        System.out.println(f);
        System.out.println(s);
    }
}


Related Tutorials/Questions & Answers:
Learn Management
Learn Management  Hi, How to learn Management online? Thanks   Hi, You can learn management at Management tutorials section. Thanks
learn jquery
learn jquery   is it possible to learn myself jquery,ajax and json   Yes, you can learn these technologies by yourself. Go through the following links: Ajax Tutorials JSON Tutorials JQuery Tutorials
Advertisements
learn jquery
learn jquery   is it possible to learn myself jquery,ajax and json   Yes, you can learn these technologies by yourself. Go through the following links: Ajax Tutorials JSON Tutorials JQuery Tutorials
Learn Ajax
Learn Ajax  Hi, Give good links to learn ajax. What is the correct url at roseindia.net to learn Ajax? Thanks   Hi, If you are beginner in Ajax start learning from the index of Ajax tutorial. Start learning Ajax
to learn java
to learn java  I am b.com graduate. Can l able to learn java platform without knowing any basics software language.   Learn Java from the following link: Java Tutorials Here you will get several java tutorials
Learn java
Learn java  Hi, I am absolute beginner in Java programming Language. Can anyone tell me how I can learn: a) Basics of Java b) Advance Java c) Java frameworks and anything which is important. Thanks
learn CVS
learn CVS  How i can use cvs in eclipse, How i can check in and cheack out my project
Learn Java
There is a need to learn Java programming in today?s world as it has become..., there is need of Java, Hence it become more important for a programmer to learn... and server. If you are in need to learn Java quickly then the best way to achieve
Guide me to learn Flex
Guide me to learn Flex  Guidance to learn Flex Thanks in Advance. Kamal   Please visit the following link: Flex Tutorials
i want to learn Jquery
i want to learn Jquery  i want to learn jquery can u plz guide me   Yes, you can learn these technologies by yourself. Go through the following links: Ajax Tutorials JSON Tutorials JQuery Tutorials
learn sql - SQL
learn sql  how to learn sql......idont know anything about programming knowledge  Hi Friend, Please visit the following link: http://www.roseindia.net/sql/ Thanks
Learn PHP Tutorials for Beginners
Learn PHP Tutorials for Beginners  Hi, I am just pass-out from college and eager to learn the PHP. Can anyone suggest or provide me a resourceful information for php beginners. Thanks
Where to learn Struts 2?
Where to learn Struts 2?  Hi, I am beginner in Struts and trying to find good tutorial to learn Struts 2 framework. My project is in Struts 2 and soon I have to work on the project. Let's know where to learn the Struts 2
How to learn PHP?
How to learn PHP?  Hi, How I can learn PHP easily? Thanks  Hi Friend, Please visit the following link: http://www.roseindia.net/php/ Thanks  Hi Friend, Please visit the following link: http
How we learn java
How we learn java  what is class in java? what is object in java? what is interface in java and use? what is inheritence and its type
How we learn java
How we learn java  what is class in java? what is object in java? what is interface in java and use? what is inheritence and its type
How we learn java
How we learn java  what is class in java? what is object in java? what is interface in java and use? what is inheritence and its type
How we learn java
How we learn java  what is class in java? what is object in java? what is interface in java and use? what is inheritence and its type
How we learn java
How we learn java  what is class in java? what is object in java? what is interface in java and use? what is inheritence and its type
How to learn programming free?
How to learn programming free?  Is there any tutorial for learning... programming on RoseIndia.net which you can learn free of cost. These are: Hi, Here are the tutorials: Beginners Java Tutorial Learn Java in a day Master Java
How to learn Quartz?
How to learn Quartz?  Hi, I have to make a program in Java is scheduling account processing Job after an interval of 20 minutes. Tell me the tutorial. Thanks   Hi, Please check the tutorial Hello World Quartz
Easiest way to learn Java
There are various ways to learn Java language but the easiest way to learn... to learn the language from the comforts of their home. Every topic and chapter... to learn. Online learning is similar sometimes better than classroom training
How can I learn Java?
How can I learn Java?  Hi, I have just completed a course in HTML.... Now I want to learn Learn Java programming and become the expert in Java programming. How can I learn Java? in shortest possible time. I mean I just want to begin
Wt is easy way to learn UML
Wt is easy way to learn UML  Hello Friends, Please guide me,How to learn UML in easy way and efficent way. Thanks in Adavance Thanks, Abiram
Please help me to learn - WebSevices
Please help me to learn  Please help me to learn Java Fast
Learn Java in 21 days
Anyone can learn Java in 21 days, all they need is dedication and concentration. Java Guide at RoseIndia can help you learn Java in 21 days. The course... much. It is fairly easy to learn the language once you understand the concept
How to learn Java easily?
If you are wondering how to learn Java easily, well its simple, learn... Java learning. The students opting to learn Java are of two types, either... a simple language and easy way to understand and learn the language. Java on its
Where to learn java programming language
Where to learn java programming language  I am beginner in Java and want to learn Java and become master of the Java programming language? Where to learn java programming language? Thanks   Hi, Java is Object
How to Learn Java
, how to learn Java? Learning Java is not that difficult just the right start is needed. The best way to learn Java today without spending money in through... that it becomes more easy for them to learn the language. These videos are made
Learn Spring Framework from where?
Learn Spring Framework from where?  I want to learn the Spring... the documentation but it does not have the easy to learn examples. So, these are not good... to understand. Where can I find the projects to learn Spring framework? Thanks
Learn Hibernate programming with Examples
Learn the important concepts of Hibernate programming language... to use the Hibernate in real life project. Here you will learn the concepts... In this Hibernate programming tutorial you will learn how to Hibernate ORM programming from
How to learn hibernate in 24 hours?
How to learn hibernate in 24 hours?  Hi, I am assigned a new project... will spend 24 hours from 48 hours. I want to learn Hibernate in just 24 hours. Is it possible to learn Hibernate in 24 hours? I don't want to be master
How to learn Java?
to learn Java language than there are two ways you can do that. One is the classroom training that are provided by some institutes or you can learn it online from... training. A young developer who is seeking a career in Java can learn the language
Best way to learn Java
Best way to learn Java is through online learning because you can learn... to learn the language at their own pace. There is no hurry or time limit to learn... can learn how he/she can make a program on IDE, actually seeing it done
Learn Java for beginners
Beginners can learn Java online though the complete Java courses provided... a programmer from basic to advance level of Java. New programmers prefer to learn Java... those who are preferring to learn the language. It is because learning
Learn some thing about ajax
Learn some thing about ajax  please provied some simple ajax code for learning   Asynchronous JavaScript and XML or Ajax for short is new web development technique used for the development of most interactive website
JDBC Training, Learn JDBC yourself
; JDBC Training - Learn JDBC yourself: In this section we are providing free JDBC training material online. You can learn JDBC at your own... will help the programmers to learn JDBC skills necessary to build powerful
Learn Java online
Video tutorials, Examples, etc. that guides a beginner to learn the language... can learn at his/her pace. Learning Java online is not difficult because every... take as much time as he/she wants to learn a topic and then move forward
I want to learn Hibernate tutorial quickly
I want to learn Hibernate tutorial quickly  Hello, I want to learn Hibernate tutorial quickly. Is there any way.. I want to learn Hibernate online.. Please help
How to learn Java with no programming experience
Tutorial, how to learn Java provides you the opportunity to you about.... Apart from these, topic How to learn Java with no programming experience... program. Certainly, we hope the topic how to learn java will definitely create
Where can I learn Java Programming
and time to learn Java in a right way. This article is discussing the most asked question which is "Where can I learn Java Programming?". We have.... Institute will teach you the basics and advance topics of Java. You even learn
how to learn xml...any suggested sited - XML
how to learn xml...any suggested sited  hi all, is there any suggested sites to learn xml quickly..how far this xml is useful in java  Hi Friend, Please visit the following link: http://www.roseindia.net
what is the procedure to learn in online course in roseindia
what is the procedure to learn in online course in roseindia  hi dear sir can you send me the fee structure and how to pay
I want to learn hibernate step-by-step.
I want to learn hibernate step-by-step.  Hello, I am very new to programming world and I am looking forward to learn Hibernate, but I would like to start from start and learn it step by step. Can you please help me.. I would
How much time it takes to learn Java
How much time it takes to learn Java  Hi, As a beginner in programming how much time it will take to learn Java programming? I have little..., You can learn the basics of Java in a day. Read our tutorial Learn Java in a day
Servlet tutorials: Learn Servlet Easily
- Index page of Servlet tutorials at Rose India website. Learn Servlet Life
In this section you will learn how to rename MySQL database.
How to rename MySQL database? In this section we will learn the safest method to rename MySQL Database. The following statement was added in the MySQL version 5.1.7: RENAME {DATABASE | SCHEMA} db_name TO new_db_name
Can you suggest any good book to learn struts
Can you suggest any good book to learn struts  Can you suggest any good book to learn struts
 

 

 

DMCA.com