Currently browsing tag

Java Basics

java-thumbnail

Downcasting In Java

Upcasting is assigning the sub class reference object to the parent class which is allowed in Java. Downcasting is assigning parent class …

java-thumbnail

Static Nested Class In Java

Static Nested classes are inner classes which are declared inside another class and also declared with static keyword. The main difference between …

java-thumbnail

Instance Initializer In Java

In my previous example I have explained how to use static initializer in Java.This example shows how to use the instance initializer …

java-thumbnail

Static Initializer In Java

This example shows how to use the static initializer in Java. The following are the few features of static blocks. Static initializers …

java-thumbnail

How To Get Classpath in Java

This example demonstrates how to get the classpath string using the Java program. It is simple that you just need to use …

java-thumbnail

How To Get OS In Java

This post writes a simple Java example program  to get the current operating system. There is a system property in Java, System.getProperty(“os.name”) which …