Operating System Design Goals

David Meador
Published on 30-Aug-2018 20:28:26
Operating Systems have become quite complex and multifaceted with the advancement of time. However, that also means it is getting more and more difficult to design operating systems that satisfy all the specifications required these days. There are no complete solutions possible for design problems, but some approaches are more ... Read More

How to parse JSON in Java?

Arushi
Published on 30-Aug-2018 12:02:16
This articles covers how to encode and decode JSON objects using Java programming language. Let's start with preparing the environment to start our programming with Java for JSON. Environment Before you start with encoding and decoding JSON using Java, you need to install any of the JSON modules available. For ... Read More

How to measure the time taken by a function in Java?

Arushi
Published on 30-Aug-2018 11:47:31
java.lang.System.currentTimeMillis() method can be used to compute the time taken by a function in java. Trick is simple. Get the before time and after time using currentTimeMillis() where before time is the time when method is invoked and after time is when method has executed. See the example below − ... Read More

How to compare two arrays in Java?

Paul Richard
Published on 30-Aug-2018 11:42:55
Arrays can be compared using following ways in Java Using Arrays.equals(array1, array2) methods − This method iterates over each value of an array and compare using equals method. Using Arrays.deepEquals(array1, array2) methods − This method iterates over each value of an array and deep compare using any overridden equals ... Read More

How to make an object eligible for garbage collection in Java?

Fendadis John
Published on 30-Aug-2018 11:37:45
Java Garbage collector tracks the live object and objects which are no more need are marked for garbage collection. It relieves developers to think of memory allocation/deallocation issues. JVM uses the heap, for dynamic allocation. In most of the cases, the operating systems allocate the heap in advance which is ... Read More

How JVM works?

Paul Richard
Published on 30-Aug-2018 11:32:58
Following are the key components and their responsibility in JVM. Classloader − Loads the class file into the JVM. Class Area − Storage areas for a class elements structure like fields, method data, code of method etc. Heap − Runtime storage allocation for objects. Stack − Storage for ... Read More

How is Java strictly pass by value?

Arushi
Published on 30-Aug-2018 11:24:18
Call by Value means calling a method with a parameter as value. Through this, the argument value is passed to the parameter. While Call by Reference means calling a method with a parameter as a reference. Through this, the argument reference is passed to the parameter. In call by value, ... Read More

How is Java platform independent?

Paul Richard
Published on 30-Aug-2018 11:16:45
When you compile Java programs using javac compiler it generates bytecode. We need to execute this bytecode using JVM (Java Virtual machine) Then, JVM translates the Java bytecode to machine understandable code. You can download JVM's (comes along with JDK or JRE) suitable to your operating system and, once you ... Read More

How are Java objects stored in memory?

Rishi Raj
Published on 30-Aug-2018 11:13:50
Java memory model is divided between Thread Stacks (One for each thread) and a heap area. Thread Stack It is a thread specific memory area and contains local variables, methods call information etc. JVM stacks could be of fixed size or variable size. If computation in a thread exceeds its ... Read More

How to iterate any Map in Java?

Paul Richard
Published on 30-Aug-2018 11:04:03
Following example uses iterator Method of Collection class to iterate through the HashMap. Live Demo import java.util.*; public class Main { public static void main(String[] args) { HashMap< String, String> hMap = new HashMap< String, String>(); ... Read More
Advertisements