Author: admin
-
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…
-
JDK vs JRE vs JVM
All three JDK, JRE and JVM are interdependent. JDK is Java Development Kit primarily meant for Developers to develop Java based applications. JRE is Java Runtime Environment where Java program runs. JDK carries JRE as an integral part of it. JRE can be installed seperately as well on systems where no developement is to be…
-
Decisions
Decision making structures require that the programmer specify one or more conditions to be evaluated or tested by the program, along with a statement or statements to be executed, if the condition is determined to be true, and optionally, other statements to be executed if the condition is determined to be false. Following is the…
-
Java Virtual Machine(JVM)
The JVM is a specification, and can have different implementations, as long as they adhere to the specs. The specs can be found in the below link − https://docs.oracle.com Oracle has its own JVM implementation (called the HotSpot JVM), the IBM has its own (the J9 JVM, for example). The operations defined inside the spec are…
-
Constants
The constants refer to the fixed values that the program cannot alter during its execution. These fixed values are also called literals. Constants can be of any of the basic data types like an integer constant, a floating constant, a character constant, a complex constant, or a string literal. There are only two logical constants : .true. and .false.…