If you wanted to, you could build
your Java applications having only installed the JDK. You could use some
arbitrary text editor to type in your program code, and then you could use
command line tools to do all the compiling and executing of your programs, and
that would work fine, and people did that for years, and some people still do
that, but in general when we're developing, we want to use a more productive
model than that. We like these things called integrated development
environments that allow us to type in our code, compile it, debug it,
everything all in one place. Now Java has lots and lots of IDEs available, and
two of those you'll most commonly hear about are NetBeans and IntelliJ, both of
which are available for free. For many years, NetBeans was maintained by the
Oracle Corporation, and when Oracle was maintaining it, it was the official IDE
for Java development. But Oracle support for NetBeans stopped as of JDK 8, so
if you're working with an older version of the JDK, you can get NetBeans
directly from Oracle, but for a version of NetBeans that supports JDKs newer
than JDK 8, we need to go out to the Apache organization. Now the version of
NetBeans supported by the Apache organization only supports Java SE officially.
The other thing you might find is that when working with the version of
NetBeans distributed by Apache, depending on the version of the JDK you're
using, you may need to go out and make manual changes to the configuration
files. Because of this, sometimes NetBeans can make it challenging for
beginners to get started. Another very popular IDE for Java is IntelliJ. I
really like IntelliJ, it's my preferred Java environment. Now the IntelliJ
Community Edition is a free version of a commercial product, and so a company
called JetBrains builds and sells a full‑blown installation of IntelliJ, but they make this Community
Edition available to us for free. And what I like about it is that the
Community Edition supports Java Standard Edition and Android, alright, so you
can use one IDE for both of those environments, which I find convenient. If you
were to decide to go ahead and go with the commercial version of IntelliJ, you
would pick up additional features. There are some other development features,
it supports Java EE, does some cool server debugging stuff, but you don't have
to go to the commercial version. The Community Edition is quite substantial and
certainly is good enough for everything we do in this course, and you'll find that
most things you're likely to want to do are supported in the Community Edition.
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...
Comments
Post a Comment
We appreciate your valuable Suggestions/Feedback