Quantcast
Channel: draalin » Level Programming Language
Viewing all articles
Browse latest Browse all 2

Learn Java Programming

$
0
0

Why would you want to learn Java programming anyways?

Learning programming in general is a great way to learn how to break problems down. Many jobs may require some sort of programming depending on the position. Not to mention it can be fun too!

The programming language.

Java is essentially C++ but re-written with what developer James Gosling thought was important. Along with main the concepts he copied over, he included both security and internet access information since C++ didn’t include it by default. So with that said in 1991 he created Java while working for Sun Microsystems.

Like C++, Java is a high-level programming language but is known for being an object-oriented programming language unlike C++ which can be both object-oriented and procedural.

Also for Java to be used as an application, it requires the Java Runtime Environment (JRE) to be installed on any machine it is executed on. As for development and creating Java applications you need to use a Java Software Development Kit (SDK) or a Integrated Development Environment (IDE).

What does a program contain?

Note that these are just brief explanations of what we will dive deeper into with future tutorials.

Very much like any other programming language Java can contain the following:

  • Comments
    • //
      • Is a way to place comments on one line
    • /* */
      • Is a way to place comments on multiple lines
  • Classes
    • Are a collection of methods
  • Objects
    • Contain instance variables
  • Methods
    • Are a way to describe something that performs a task
  • Statements
    • Are a way to control what happens during the execution of a program, here are the types of statements:
      • Conditional
        • If
          • Single statement
        • If-Else
          • Selection among two statements
        • Extended If-Else
          • Selection among several statements
        • Switch
          • Selection among several statements
      • Repetition
        • While
          • While something is true do something
        • Do-While
          • Do something at least once while something is true
        • For
          • For a specific constraint do something to each
  • Variables
    • Gives a name and location to data stored in a data type, here are the variable types:
      • Instance
        • Are specific to an object
      • Class
        • Are specific to a class
      • Local
        • Are specific to where they are locally defined
  • Data types
    • Ways to hold specific data, here are the types:
      • byte
        • Is a 8-bit integer
      • short
        • Is a 16-bit integer
      • int
        • Is a 32-bit integer
      • long
        • Is a 64-bit integer
      • float
        • Is a 32-bit floating point
      • double
        • Is a 64-bit floating point
      • boolean
        • Represents 1-bit
      • char
        • Is  a single 16-bit Unicode character

What can it do?

The three main things a Java program can do much like other programming languages is:

  • Reading input
  • Processing data
  • Providing output

What do I need?

You need an SDK/IDE to develop Java programs, here are just a few of the many you can use for Java:

Future tutorials will be using Eclipse as our IDE for Java.

Screenshot below of Eclipse’s default loading screen.

draalin-learn-java-programming-0

Screenshot below of the Eclipse’s default layout.

draalin-learn-java-programming-1

So what now?

If you are ready, it is time to start writing your first Java program! Like I said future tutorials will be using Eclipse as our IDE of choice. Also don’t get discouraged if you get stuck, programming takes practice!

The post Learn Java Programming appeared first on draalin.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images