Skip to main content

Comments

 

Java, like most programming languages, can include comments. All right, and comments are just basically text inside of your source code that the compiler doesn't see. Right, and there are really kind of just two general uses for comments. One is that it allows you to add human readable notes to your source code, right, it allows you to type things in the source code so that when you look at it later, or someone else looks at it, it's just leaving notes to understand what you were doing there. It's also useful for hiding source cool without deleting it. Maybe you're testing things out, so you want to just kind of take some things away and type some new stuff, or if there's something you don't want to anymore, but you think you want to do it again in the future, so comments allow you to take that stuff out so the content is in your source code, but the compiler doesn't compile it. There are three types of comments in Java. One, which is called line comments, and if you basically just put a double slash, basically the compiler ignores everything until the end of the line, and when I said by the end of the line. it's until you hit the Enter Key, the new line character. It's not like other statements where it relies on the semicolon, right. So, the compiler just skips everything until the next new line. Then what are called block comments where you use a slash star to begin the comment and a star slash to end it. So, the compiler skips everything between those notations. They can be happened in the middle of a line or they can span multiple lines. And the last kind is a special kind of comment called a Javadoc comment, which starts out slash star and then ends star slash. There's a utility called Javadoc that allows you to generate documentation using this special comment format. It allows you basically to write your code documentation right inside of your source code, and then when you run the JavaDoc utility, if you follow the appropriate structure in your comments, that utility will generate documentation right from the source code. The details of Javadoc are outside the scope of this course, but I've got that you URL up there on the screen for you, if you want to dig into Javadoc and learn more about it.

Comments

Popular posts from this blog

Variables, Data Types and Math Operations

  In order to do anything interesting in a program, we must have the ability to store and manipulate values. What allows us to do that are what we call variables. Now a variable, simply put, is just named data storage. Now Java is a strongly ‑ typed language. Now what that means is that when we declare a variable like, in this case, we have a variable named data Value, we have to specify the type of that variable, in this case, it's what we call an int, something that can store integers. So, what that means is that the data Value variable can only store things that are compatible with the type int. As we go through the course, we'll talk about this idea of one type being compatible with another. Now when we declare a variable, we can, of course, then assign a value to it, so our variable data Value now holds the value 100. Now when we use variables, we can do it the way we've done here where we declare it, then assign it, or as a matter of convenience, we can declare them a...

JRE vs. JDK

  The JRE and the JDK are two terms you hear people mention very frequently in the Java world, and what they are the two parts that we need in order to run and create Java applications. The JRE is the Java Runtime Environment. JDK is the Java Development Kit. And so, the JRE is what you require in order to run Java applications, and end users normally install the JRE. They're the ones who are going to run our apps. The JDK provides the tools that we need to create Java apps. So, normally, developers are the ones who install the JDK on their machines. And in order to develop apps, you need to run them, so the JDK installation includes a JRE. So how does all this work together? If we sit down, and we type up a Java source file with our program code inside of it, and we want to go ahead and run that in some host environment, how do we do it? A host environment might be Windows, Linux. It could be Mac. It could even be a browser. It might be a phone running Android. How do we get from ...

ClaimCenter

Claim Center is a web-based enterprise software application designed to manage the process of reporting, verifying, and making payments on claims against a policy. It manages the claims process from first notice of loss through execution of financial transactions, including the payment and setting of reserves. CC Functionality involves Group-based ownership of claims and claim sub objects Claim Financials Address book integration Workspace to manage claims process Distributed collaboration Activity coordination Worker and claim management