Java Basics

Java is one of the most popular and widely used programming language and platform. A platform is an environment that helps to develop and run programs written in any programming language.
Java is fast, reliable and secure. From desktop to web applications, scientific supercomputers to gaming consoles, cell phones to the Internet, Java is used in every nook and corner.

However to become proficient in any programming language, one Firstly needs to understand the basics of that language.

Therefore, below are the basics of Java in the format in which it will help you the most to get the headstart:

  1. Java Environment: The programming environment of Java consists of three components mainly:
    • JDK
    • JRE
    • JVM

    Learn about setting up the Java environment here:

  2. Java Basic Syntax: Every programming language has its own set of rules to declare, define and work on its components. Reading and learning about all of them together is difficult. Therefore here is a simple task of printing ΓÇ£Hello WorldΓÇ¥ in Java. During this process, major components and their syntaxes are explained clearly.

    Learn about printing ΓÇ£Hello WorldΓÇ¥ in Java here: Beginning Java programming with Hello World Example

  3. Comments in Java: In a program, comments take part in making the program become more human-readable by placing the detail of code involved and proper use of comments makes maintenance easier and finding bugs easily. Comments are ignored by the compiler while compiling the code.

    Learn about Comments in Java here: Comments in Java

  4. Data Types in Java: Each variable in Java has an associated data type. Each data type requires different amounts of memory and has some specific operations which can be performed over it.

    Learn about different data types in Java here: Data types in Java

  5. Variables in Java: A variable is the name given to a memory location. It is the basic unit of storage in a program.

    Learn about Variables in Java here: Variables in Java

  6. Keywords in Java: Keywords or Reserved words are the words in a language that are used for some internal process or represent some predefined actions. These words are therefore not allowed to use as variable names or objects. Doing this will result in a compile-time error.

    Learn about Keywords in Java here: Keywords in Java

  7. Operators in Java: Operators are the foundation of any programming language. Thus the functionality of Java programming language is incomplete without the use of operators. We can define operators as symbols that help us to perform specific mathematical and logical computations on operands. In other words, we can say that an operator operates the operands.

    Learn about Operators in Java here: Operators in Java

  8. Decision Making (Control Statements) in Java: Decision Making in programming is similar to decision making in real life. In programming also we face some situations where we want a certain block of code to be executed when some condition is fulfilled.
    A programming language uses control statements to control the flow of execution of the program based on certain conditions. These are used to cause the flow of execution to advance and branch based on changes to the state of a program.

    Learn about Decision Making in Java here: Decision Making in Java

  9. Loops in Java: Looping in programming languages is a feature which facilitates the execution of a set of instructions/functions repeatedly while some condition evaluates to true.
    Java provides three ways for executing the loops. While all the ways provide similar basic functionality, they differ in their syntax and condition checking time.

    Learn about Loops in Java here: Loops in Java

Similar Posts

  • Java Terminology

    Introduction to Classes and Methods     1) Which is used to get the value of the instance variables?         Ans: Dot notation.     2) The new operator creates a single instance named class and returns a reference to that object.         a)True         b)False         Ans: a.     3) A class is a template for…

  • Java Featurs

    Exception Handling     1) What is the difference between ΓÇÿthrowΓÇÖ and ΓÇÿthrowsΓÇÖ ?And itΓÇÖs application?         Ans : Exceptions that are thrown by java runtime systems can be handled by Try and catch blocks. With throw exception we can handle the exceptions thrown by the program itself. If a method is capable of causing an…

  • Java Packages-2

    Networking Concepts     1) The API doesn’t list any constructors for InetAddress- How do I create an InetAddress instance?         ANSWER : In case of InetAddress the three methods getLocalHost, getByName, getByAllName can be used to create instances.         E.g.         InetAddress add1;         InetAddress add2;         try{         add1 = InetAddress.getByName(“java.sun.com”);         add2 =…

  • Java String Basics

    String Handling     1) Which package does define String and StringBuffer classes?         Ans : java.lang package.     2) Which method can be used to obtain the length of the String?         Ans : length( ) method.     3) How do you concatenate Strings?         Ans : By using ” + ” operator.     4)…

  • Java Packages

    Java.lang     1) java.lang package is automatically imported into all programs.             True             False         Ans : a     2) What are the interfaces defined by java.lang?         Ans : Cloneable, Comparable and Runnable.     3) What are the constants defined by both Flaot and Double classes?         Ans : MAX_VALUE,         MIN_VALUE,        …

Leave a Reply

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