Pinterest Stumbleupon Whatsapp
Advertisement

learn java programmingThere are plenty of people I know who’d like to know how to program, yet they’re confused by how to start and what the general ideas of programming are. In addition, there are a large number of programming languages Which Programming Language Should You Learn For Software Development? Which Programming Language Should You Learn For Software Development? When starting on the path of programming, it’s important you invest your time wisely in choosing to learn something that will both benefit you in the immediate future with visible results on your platform of... Read More to choose from, so choosing the right one to start out with may be a little difficult for the inexperienced programmer. This article will help you get started with a relatively easy to learn language.

Why Learn Java Programming?

Java is my programming language of choice when trying to learn the concepts of programming. This is because Java is very cross-platform, has a fairly readable syntax (compared to other languages), and there are many tools that can make developing in Java a fairly easy task. Before we begin, make sure that you have the JDK installed, as you won’t be able to do a thing without it.

Parts Of Java

Java programs are separated into classes. Technically each class is its own program, but you can work with numerous classes to make a larger, more complex program while maintaining good code organization. At least one of those classes needs to be the main class, or contain a main method. A method is a chunk of code that executes when you simply call the name of the method. The main method is required as Java looks for this method to start the program. You can pass parameters to other methods if you’d like, allowing the method to take input and do something with it.

Variables

More than likely you’ll also need to store information at certain points. These are variables, or sometimes called fields, that hold the information. You have to specify the type of variable so that Java knows what you’re trying to hold. This includes things like true/false (boolean), numbers (int, long, double, etc.), and much more. As Java can support object-oriented programming, you can even hold instances of a class in a variable.

Example

As an example, here is a class that would simply print out the number 6 onto the screen:

public class makeuseof
{
public static void main (String args[])
{
int myNum = 6;
System.out.println(myNum);
}
}

2 Recommended Applications

There are two applications I would recommend that will help you during your programming adventures.

Advertisement

Greenfoot

Greenfoot Learn How To Write Programs In Java With Greenfoot Learn How To Write Programs In Java With Greenfoot Greenfoot takes care of learning a programming language by providing a developing platform, meant for educational purposes, where users can quickly get started and get visual results back in the form of graphics. Greenfoot runs... Read More is a very fun way to get the hang of programming, as you can see any changes you make to the code in a video game setting. Additionally, there is a great community that can give help, ideas, and much more. So if you want a visual programming experience, Greenfoot is a great way to get started.

Geany

learning about java programming

For those who want to have a good enough editor to do the nitty gritty programming, I recommend using Geany Geany - A Great Lightweight Code Editor For Linux Geany - A Great Lightweight Code Editor For Linux Surprisingly, Linux doesn't offer that many good IDE's (Integrated Development Environments). I believe this is because back in the day most Linux programmers took out good old Notepad (or gedit in this case), and started... Read More . It is available for all operating systems, is relatively lightweight, and simply gets the job done. There are indeed lots of other editors that people can choose from, and they’re welcome to use those instead, but my recommendation stays with Geany.

2 Recommended Websites

There are a couple of websites that can help you out if this introduction didn’t make much sense.

learning about java programming

First is “Javanotes 6.0” which provides a much more lengthy but complete explanation of basic Java programming concepts. Here you’ll find loads of information and some programming exercises. If you have the time for it, it’s a great read.

learn java programming

Lastly, you can also check out HowStuffWorks’ page on Java. It also includes some information and guides you to making your first program. This is another interesting read, and involves a different first problem than the traditional “Hello World” example.

Conclusion

Getting started with Java isn’t as hard as it seems. With some time and practice you’ll get the hang of it, and from there you can build more complex programs that provides more functionality. Additionally, if you master the programming concepts, it’ll be easier to learn other programming languages as a large portion of the learning process is simply different syntax.

Let us know what your Java apps and tools are in the comments below.

Leave a Reply

Your email address will not be published. Required fields are marked *