Sir since you did char type casting, it didn't print out the ascii value of Enter . Thank you sir btw for the video !
@praveshmandloi91318 жыл бұрын
hii sir thats nice way in that you have to write print except println.. then it wil run in right manner.. int i=System.in.read(); System.out.println("You have enter:"+(char) i); String str="";
@MrYrpr7 жыл бұрын
I like your videos a lot Once I get a job, I will take paid course from you just as a way of saying thank you
@adithyak72338 жыл бұрын
Hi Navin,your teaching is really good, thanks a lot
@aarushigupta11069 жыл бұрын
sir yr contribution is anonymous .... thanku so much for clearing our doubts ... this really means a lots and lots of thanks a students trophy for a teacher infact the best teacher of java
@SmartProgramming6 жыл бұрын
helpful video sir, thanks for this explanation 👍👍
@CindyXin5207 жыл бұрын
thanks for the tutorial, helpful as always. comment out the initial value of int i and the code works: int i; // comment out initial value "int i = System.in.read();" String str = ""; while((i=System.in.read())!=10){ str = str + (char)i; } System.out.println(str);
@mohanrammanikandan79395 жыл бұрын
Hi, Cindy. Can you please explain how this loop works and the output arrives at "avin Reddy" finally ?
@BoogieBash4 жыл бұрын
code inside of main: int i=32; String s1=""; while(i!=13){ i=System.in.read(); s1=s1+(char)i; } System.out.println(s1);
@deepakpatra20114 жыл бұрын
It also works with 10 instead of 13.
@akarim36438 жыл бұрын
Your lecture is really very helpful...Thanks a lot keep it up !!
@rohitsoni93258 жыл бұрын
Correct code for taking the input till user presses space key is::: System.out.println("Enter: "); String Str = ""; int i = System.in.read(); while((char)i != ' ') { Str= Str + (char)i; i = System.in.read(); } System.out.println("String is :"+Str);
@mehrosenasir39665 жыл бұрын
The object "out" of printstream class in not created in System class , it is placed in System class only .
@nicholascousar43064 жыл бұрын
Is that what is meant by "out" being listed as a field, rather than a subclass of the System class?
@valdemirmaximo50643 жыл бұрын
Hi, I'm trying to use this method in Netbeans, but I can't find the place to enter the character and type enter. In the output it doesn't work. Do you have any idea?
@VC.Vishal6 жыл бұрын
ASCII code for Enter is 13. while(i!=13) { i=System.in.read(); str = str + (char)i; }
@vishnukiran38476 жыл бұрын
ASCII code for Enter key is 10. 13 is for Carriage return key.
@divyeshkumarbalar77325 жыл бұрын
@@vishnukiran3847 That is what happens when you enter
@divyeshkumarbalar77325 жыл бұрын
but nevermind, both works equally
@nilaythakkar7 жыл бұрын
Really Helpful.Thank You so much
@bilehchoudhury34324 жыл бұрын
Why is this program not wait for String input import java.util.*; class Input{ public static void main(String args[]) { Scanner s=new Scanner(System.in); System.out.println("Enter Age"); int x=s.nextInt(); System.out.println("Enter Your name "); String name=s.nextLine(); System.out.println("Name is : "+name+"Age is :"+x); } }
@manujkumarjoshi93424 жыл бұрын
since you are having some code upward, your Navin reddy code is conflicting with that. Else it is working fine.
@kirangadhave81529 жыл бұрын
ASCII value for Enter is 10 i think. It didnt display the ASCII value for ENTER because you typecast i as char in sout statement. I think! Awesome tutorial series btw!
@souvikpal62627 жыл бұрын
9.4 is missing .. Please post the link in playlist.
@the_laptopgamer71677 жыл бұрын
kzbin.info/www/bejne/oGXUqH6VbZqefbc found this on youtube .. and I believe this one is the missing part of bufferedreader ... But I have no idea how someone else is uploading it on youtube while the owner of this video is missing it from his playlist
@souvikpal62627 жыл бұрын
Omg ! Yes .
@alokdubey47716 жыл бұрын
Sir we can write this also na While(system.in.read()!='\0') Sir please try this also I don't have a system in my house that's why I'm telling you
@dr.nishachaudhary58954 жыл бұрын
yes we can. but you cannot.....as you dont have a system, so first take a system, then right the code you suggested.... it will work ....ha ha ha
@aarushigupta11069 жыл бұрын
sir commenting for marker interface is disabled so my question is on marker interface can u quote an example for its use if we know that we have implemented P then why we need to check
@LogicalManSujeet6 жыл бұрын
what is your paid course
@xyber_punk5 жыл бұрын
public class UserInput { public static void main(String[] args) throws Exception { int i=System.in.read(); System.out.print((char)i); String str=""; while((i=System.in.read())!=10) str=str+(char)i; System.out.println(str); } }
@mohammedviso22697 жыл бұрын
Nice
@WorldWorrier32734 жыл бұрын
I think you are also a beginner in Java.
@mitashasrivastava96057 жыл бұрын
when I am taking an string input using this method Dan it is going to infinite loop.can uh plss help?
@vandachhoeung19766 жыл бұрын
I like it
@WorldWorrier32734 жыл бұрын
I think you aren't comfortable with Java , and you shows a lots of add too which is really makes us unhappy ☹️