Arrays and ArrayLists in Java

Arrays

Arrays are very useful to know because they are a standard that is built into C, its children languages (Java, C++, etc) and other languages such as Python. An array allows the programmer to store multiple different variables, of the same type, into a single list that can be called upon as a certain object. This, coupled with loops, makes it unnecessary for the programmer to know how many variables are being stored. It does this by allowing the programmer to create one thing (the array) instead of creating multiple different variables that would all be individually initialized and named.

Read moreArrays and ArrayLists in Java

Please follow and like us:

Reading User Input Using the Scanner Class in Java

Java is very versatile in its ability, but can become even more versatile with the integration of user input. One way to have user input is the Scanner Class. This class allows the programmer to scan the keyboard and get input from the user.

How to Instantiate the Scanner Class

Since it is not built into the regular Java library, it needs to be imported. It can be imported like so:

Scanner Class import

or

Screen Shot 2016-03-01 at 1.04.58 PM

Note: All imports are declared at the top of the program before the main method like so:

Screen Shot 2016-03-01 at 1.05.22 PM

Read moreReading User Input Using the Scanner Class in Java

Please follow and like us:

Starting to Code in Java

Java is a versatile language that is great for beginners. Learning to code in Java is also fairly easy to learn how to use and has many applications. Java is an Object Oriented Programming (OOP) language. This means that by defining objects using Java we can create our own variable types. If you are new to java coding feel free to check out my other pages on what an IDE is and how to download one, how to use jGrasp, and how to use Eclipse. I will be using Eclipse to show you how to start coding.

 

Read moreStarting to Code in Java

Please follow and like us:
Facebook
Facebook
Google+
Google+
http://aiclarke.com/tag/object">
YouTube
LinkedIn
RSS