Skip to main content

Statement Structure and Whitespace

 Java programs are made up of statements. Now, a lot of different things can go on in a statement, and we'll talk about those things throughout this course, but fundamentally, programs are made with statements. Now each statement ends with a semicolon. Java is a language where the newline and the Enter key doesn't really create a new statement. It relies instead on the semicolon. If you're going from any of the Cbased languages, that's something you're very familiar with. Other languages like Visual Basic use the end of line to mark a statement. In Java, it's the semicolon. And the parts of a statement can be separated by zero or more whitespaces, and a whitespace could be many different things. It can be the space character, it can be a tab. And because statements don't end with newline, even the newline itself is just a whitespace in Java. Java's a language that gives us a lot of flexibility with whitespaces, so remember we said that the parts could be separated by zero or more whitespaces, so it allows us to format things in a way that works well for us. So I can have a statement like this where all the parts are pushed all together with no whitespaces between them, but then I can have this same statement where I just put a space after the printing, a space after the parenthesis, a space before the other parenthesis. It'll do the exact same thing. I can put multiple spaces in there, and that still does the exact same thing. Now remember that because the newline is considered a whitespace, I can even format it like this. This is kind of a crazy way to format it, and I wouldn't suggest you do this, but it's all just whitespace. So, after that printing, we've got a newline, followed by a bunch of the space characters. That's fine. Right after that parenthesis, we've got a newline again. After Hello World, we've got a newline, another newline, then a whole bunch of whitespaces or a whole bunch of space characters. And so, it just shows us that the whitespace allows us to indent, format, put line breaks in a way that works well for us. The whitespaces are just separators, and it's that semicolon that marks the end of a statement.

Comments

Popular posts from this blog

RPA Implementation Approach

RPA Implementation Approach: 1. Tool Selection o     Based on user requirements, features available in tools, you’ve to select TOOL from mentioned above         2. Process Prioritization o     After successful section of Tool, you’ve to consolidate & prioritize the all processes in current operation. Let’s start automating lowest first and most important to next

Key Points of Leading RPA Tools

Key Points of Leading RPA Tools Automation Anywhere(AA) Blue Prism(BP) UI Path Developer friendly tool RPA Term was invented by Blue Prism Extremely User Friendly Offers Front and Back Office Robots It is an Enterprise grade RPA Solution tool Implementation Speed is high Script based, More Programming Skills required Supports only Back Office robots Re Usability is more since various integrations available with different workflows Smart Recorder Option available Code Insertion is difficult and not user friendly Free Community edition (PDF’s, Videos available for FREE) AA Bots can deploy in Physical Front Office machines & Cloud Extreme control over activities (Object Creation, Coding etc.) Con is - No Coding Annual support cost and license cost is higher What is Best RPA Tool...

Defect/Bug Life Cycle

Bug Life Cycle: It is a cycle in which a defect goes through different phases during its lifetime The Journey of a Defect/Bug from its NEW (or Born/Found ) state to Close (or END/Fixed ) state, so this journey of a cycle is known as ‘ BUG LIFE CYCLE ’. We can also called it as ‘ DEFECT LIFE CYCLE ’ 1.        New:  When a defect is logged and posted for the first time. It’s state is given as new. 2.        Assigned:  After the tester has posted the bug, the lead of the tester approves that the bug is genuine and he assigns the bug to corresponding developer and the developer team. It’s state given as assigned. 3.        Open:  At  this state the developer has started analyzing and working on the defect fix. 4.        Fixed:  When developer makes necessary code changes and verifies the changes then he/she can make bu...