Jesse and Freya- Java Lesson 7: String and input

(My Original Blog Post: -*

Attention! API Garbage (might be unreadable):

string scanner print

Also Carstairs show this job rewrite our job was some strings and get them out of our deal is this was warmly 17 on we create a new string to string the string is a string of characters is basically a whole bunch of characters all have together” to a text of each text is high there is a string literal in what liberals are basically one part of the document will datastream component of the strings and object even though in this case we don t call it a new constructor like you use string equal string to a new string you could do that on past the constructed string literal that you don t need to go services shorthand notation were automatically allocate memory and creates the new object that s just an extra lost her younger sisters were there at the meetings uses the system… print line from a text out and then you can do string addition and I was basically concatenate to just stick them together and so I actually go to Mexico and I don t like and can I store the concatenation back into width text as equals in the world/and now/and as an escape character:
character looked so basically there are pleased using/doesn t print this week s show there are certain characters that you prefer to using/another character after losing special in this easy performance using/and an increase in
in your output so in this case for the entire code I m not going he s print line_newsprint to read print functions and job print S. print and print line in the past) line of the newsprint as much as possible and show you where new lines and just so you know they re programming languages that don t have those and printer truth or so in this case the important escape characters for you no similar print a single click or double quote on each of the developers have even doubled to string when it closes the strength and beauty/”escapes that character and turns it into something that condones string, not shown in the eye after we print out the combined a higher world string in line 22 and 25 we have the strength of populist researchers are more equal to one of those really important once you should know about me and which concatenates using string addition here are escape characters and interest ads.string and it escapes them and Morgan and I string a concatenate on non-strings with strings and prints which is on our time and make him into juror content and then online 30 we just printed out to string literals this is a number +10+
on the thing about string addition is you can add things that are strings to strings and jostle automatically turned into a struggle to figure out what that should look like this year s easy “if you integer plus integer x (go to normal in a tradition and then when their sister since a string of another object of suspicion if it s to the integer and double of the proper addition will make a strength we can see the online 32 I have normalization in parentheses in the concatenation edition which happens towards the support of freedom of the last moment input still a scanner as a scanner scanner is basically an object that we pass it something to take input from and then you d call a whole functions within the scanner to say okay now give me the next one of these is basically think of it as a think of it as a text file a scanner century toxicity have a huge text document and have it little bluesy thing prisons where your cursor is imaging company noted beer is moved up the cursor around the city started very beginning and hit the right button on your keyboard to write their systems through the entire text file that s what extent is only in this case instead of passing a text file which can pass Stephen NASCAR instead were creating scanner object and passing it the input to that from the system Council wishes to system.and then were calling scanner functions is that okay was the next Wednesday s dismissal of and so you only have to make one scanner to get input from a certain source on newbie programmers tend to not understand how scanner works as a example code and say okay well I create a scanner in the background number from a scanner to doodles on principle continues to create new scanners you don t need to make one scanner for your system and put in and get everything you need from from now on I call my scanner object to scanner with lowercase S. it s just simple on nuclear scanner of everyone you can call input letter and call whatever it s just certainly much else so on 141 and will prompt basically telling user and shirtless taxonomical are scanner.
another function within the scanner object which will basically stop the program from doing anything and wait for the user to enter anything into the consulate derived from entity in the terminal so you enter your text you enter and that function evaluates and returns the string that Goss basically it waits for
character is you want to switch from one character Strength of the consulate will want to guess what it throws everything ago directly to leverage returns in this case is returning to a string that were calling input and the largest print astronauts in the next
and then on scanners by default the next function to him stands for species and what does you hear and now users entering input and not more but those take everything up to first base in the middle just ignore the first is that I m just continuously draw the space key change whether dropped the space key run across another character that s a function within Eagle and you don t run Outlook up in APIs really curious for MoveOn and then online 52 I actually didn t integer you get an integer by strong eat and then just store the function returns and 20 number and you can in a brothel easily be dissenting with the devil you say that Julian was going to be careful to say case-sensitive although her case for true or false now so you enter the wrong softshoe free breakfast program asks you for one think it also has to do for an integer given character to little people at Cornwall District released to the professional printing error message saying input mismatch says important it is scanner that s what it s expecting Wendy in your code when using a scanner.C. and integers are sent and next end you better hope the next thing that enhances and introduces it isn t it s going to throw an exception in our ways of catching those exceptions is basically sent the code wasn t doing was expecting you know you re having with handling missing the code so your code now.X. on what works and then last formatting data print F. stands for print function uglies were preformatted since the print format and so I create an integer called age of 21 and I create a string of name binding Jesse and I create a local favorite Schuster: 4184 is designed to print F. person… my name is and then % S. and then, my age is % D. than that, my favorite number is % S. pencil when you do not have common name, age, favorite all been passed as arguments to this print function so basically the way of print project works is there certain key character combinations percentage
notice is very important, Prince Prince of improper so percentage went in there after it stands for a type of very politically reprinted in the way to format vaccine strain so it s expecting a string to there being means decimal number since expecting integers sure about something as a decimal number to their pass means floating-point numbers is expecting personal hurdles in the way it works as it goes through the string to printed circuit is not the pedestrian is the Prince Little does do do customized printable list of important detentions moves and echoes the arguments after that string and expects them to come in the same order that became Minister on gas guzzlers to earlier links in sidebar for no questions he would have more information in the schema should fast on there isn t a locking cover here so I hope you understand and ask questions if you got them thanks for ceiling


~ by bitahatini on December 21, 2008.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: