Author: admin

  • Type Casting

    Java Type Casting (Type Conversion) Type casting is a technique that is used either by the compiler or a programmer to convert one data type to another. For example, converting int to double, double to int, short to int, etc. Type typing is also known as Type conversion. There are two types of cast typing allowed in Java…

  • Data Types

    Data types define the type and value range of the data for the different types of variables, constants, method parameters, returns type, etc. The data type tells the compiler about the type of data to be stored and the required memory. To store and manipulate different types of data, all variables must have specified data types. Java data types are…

  • Arrays

    Arrays can store a fixed-size sequential collection of elements of the same type. An array is used to store a collection of data, but it is often more useful to think of an array as a collection of variables of the same type. All arrays consist of contiguous memory locations. The lowest address corresponds to…

  • Variable Types

    What is a Java Variable? A variable provides us with named storage that our programs can manipulate. Each variable in Java has a specific type, which determines the size and layout of the variable’s memory; the range of values that can be stored within that memory; and the set of operations that can be applied…

  • Strings

    The Fortran language can treat characters as single character or contiguous strings. A character string may be only one character in length, or it could even be of zero length. In Fortran, character constants are given between a pair of double or single quotes. The intrinsic data type character stores characters and strings. The length of the…

  • Basic Syntax

    When we consider a Java program, it can be defined as a collection of objects that communicate via invoking each other’s methods. Let us now briefly look into what do class, object, methods, and instance variables mean. First Java Program Let us look at a simple code that will print the words Hello World. Example Let’s…

  • Numbers

    Numbers in Fortran are represented by three intrinsic data types − Integer Type The integer types can hold only integer values. The following example extracts the largest value that could be hold in a usual four byte integer − When you compile and execute the above program it produces the following result − Please note…

  • Environment Setup

    Set Up Your Java Development Environment If you want to set up your own environment for Java programming language, then this tutorial guides you through the whole process. Please follow the steps given below to set up your Java environment. Java SE is available for download for free. To download click here, please download a version…

  • Hello World Program

    Printing “Hello World” on the output screen (console) is the first program in Java and other programming languages. This tutorial will teach you how you can write your first program (print “Hello World” program) in Java programming. Java program to print “Hello World” Java program to print “Hello World” is given below: Steps to Write,…

  • Loops

    There may be a situation, when you need to execute a block of code several number of times. In general, statements are executed sequentially : The first statement in a function is executed first, followed by the second, and so on. Programming languages provide various control structures that allow for more complicated execution paths. A…