rahul124-world-blog
rahul124-world-blog
Developer
6 posts
Be one and feel how it feels.
Don't wanna be here? Send us removal request.
rahul124-world-blog · 7 years ago
Photo
Hahahahah Genuine Thinking.
Tumblr media
Apple logic
96 notes · View notes
rahul124-world-blog · 7 years ago
Photo
Not Again Java
Tumblr media
The true horror
79 notes · View notes
rahul124-world-blog · 7 years ago
Photo
Tumblr media
When you realize you forgot a return statement and you realize you just spent 9 hours and it’s 3 am.
102 notes · View notes
rahul124-world-blog · 7 years ago
Photo
Tumblr media
Java lesson #002
60 notes · View notes
rahul124-world-blog · 7 years ago
Text
How to take input from user in java
In this tutorial, we are gonna see how to accept input from a user. We are using Scanner class to get the input. In the below example we are getting input String, integer and a float number. For this we are using the following methods: 1) public String nextLine(): For getting input String 2) public int nextInt(): For integer input 3) public float nextFloat(): For float input
Example :
import java.util.Scanner; class GetInputData {  public static void main(String args[])  {     int num;     float fnum;     String str;     Scanner in = new Scanner(System.in);     //Get input String     System.out.println("Enter a string: ");     str = in.nextLine();     System.out.println("Input String is: "+str);     //Get input Integer     System.out.println("Enter an integer: ");     num = in.nextInt();     System.out.println("Input Integer is: "+num);     //Get input float number     System.out.println("Enter a float number: ");     fnum = in.nextFloat();   �� System.out.println("Input Float number is: "+fnum);  } }
output: Enter a string: Chaitanya Input String is: Chaitanya Enter an integer: 27 Input Integer is: 27 Enter a float number: 12.56 Input Float number is: 12.56
0 notes
rahul124-world-blog · 7 years ago
Photo
The Place Were you can Heal yourself Nature’s Kiss.
Tumblr media
Milford sound, New Zealand
276 notes · View notes