Monday, February 15, 2021

How a Java Program will get executed?


We will be writing the code in the notepad/Edit plus which is also called as source file which will be in the human readable format & save the file with .java extension.

Once after saving, to convert into machine readable format, need to perform two operations: Compilation(javac) & Interpretation(java).

The compiler will receive .java file as an input & generates .class file. The compiler will check for the following: Syntax ,Rules and translates from .java file to .class file.

.class file is a byte code which is also called as Intermediate code which cannot be read by human nor machine. This .class file will be given as an input to the interpreter which will generate the binary code & given as an input to the Operating system, O.S will perform the operation & gives the output.

Now Let us see about JDK, JRE, JVM & JIT:

What is JDK?

JDK stands for Java Development Kit. It is a development kit which has all the utilities & the library files to develop a java software.

What is JRE?

JRE stands for Java Runtime Environment. It is an environmental setup which is provided to run the java program. Since, JRE is installed in each & every electronic device, the .class file can be executed on any device. Hence, Java is called as platform independent language.

What is JVM?

JVM stands for Java Virtual Machine. It is a virtual machine which doesn’t exist physically & it is whole responsible to execute the java program.

What is JIT?

JIT stands for Just In Time.

JIT converts .file to binary format. The interpreter does the following:

  1. Reads line by line
  2. executes
  3. translates form .class file to binary format.

The program might be syntactically correct, if it is an abnormal statement like 1/0, it will throw Run Time Error/Exception(RTE).

All the Java programs will execute line by line from left to right.

Thanks for reading this article!!!

Hope you liked!!!


Friday, February 5, 2021

WBT & BBT...!!

What is White Box Testing?
Testing the each & every line of code is called as White Box Testing. Developers will do White Box Testing. Since the code is visible ,it is called as White Box Testing or Open Box Testing.

What is Black Box Testing?
Testing/ Verifying the functionality or behaviour of an application against customer requirement specification called as Black Box Testing or Functionality Testing or Behavioural Testing.
Testers will do Black Box Testing. Since the code is invisible , it is called as Black Box Testing.

Below are the Differences between WBT & BBT:

White Box Testing

Black Box Testing

It is done before software is ready.

It is done after software is ready.

Code is visible

Code is not visible

Here, developer will test the logic of the code.

Here, tester will test the functionality or behaviour of the application.

To do WBT, programming knowledge is required.

To do BBT, programming knowledge is not required.

Developer will give the input to the source code & check the output according to Requirement specification.

Tester will give the input to the application or software & check the output according to the Requirement specification.


Thanks for reading this  article.