Technology Inside Out!

Index ¦ Archives ¦ Atom ¦ RSS > Category: Java ¦ Atom

Java: Autoboxing and -XX:AutoBoxCacheMax

Autoboxing is the mechanism in Java to convert primitive type values to respective wrapper class object. Java programmer mostly use autoboxing while using collections, since collection only holds object and to put primitive type data into collection, it's need to use wrapper classes to convert into objects.

So , here is …


Java Multithreading : Thread States and Thread Priority

In a thread lifecycle it can  have one of the  following states mentioned below. I have already explained Thread Life Cycle and basics of thread including Daemon Threads.

Now let see inside the thread states and how to achieve them .


Java Multithreading

Threads.  Thread is also known as lightweight process. Java multithreading allows to process multiple task simultaneously with less overhead than process. Mostly use to monitor session, background synchronization etc.

Content

Processes …


JAVA - Getting Started with Introduction

Introduction_to_java

Before learning JAVA, it is advisable that you should have a programming background. Even if you re not from programming background, I will try to make it as simple as I can.

JAVA is one of the most powerful language. The various software which are powered by this programming language …


Java Reflection: class "Method" to inovoke methods and get metadata

Java Logo

using [java.lang.reflect.Method]{style="font-family: courier new,courier;"} you can get metadata/signature of methods (including private) and can invoke accessible methods at runtime.

Class Method provides a great tool to list all methods and find information about methods.  following tutorial will provide you more detail of class …


Java 7 : Try-with-resources - Close resources automatically with AutoCloseable interface

Every time we write code with FileInputStream,

BufferReader

  etc. we need to close those resource explicitly in finally block.

Now from Java 7, there are two interfaces included

Closeable

and

AutoCloseable

with single abstract method

close(),

  which enables implementing class to close resources aromatically after try block.

Lets see how …


Java 7: Binary literal type

From Java 7 Binary type also joins the category of literal with *

byte, short, int and long

.* Which means a binary value can be assigned  by using 0b or 0B  prefix to a  primitive type.

What is a Literal :  A literal is source code representation of source code. Which can …

© The Geeky Way. Built using Pelican. Theme by Giulio Fidente on github.

Disclaimer Privacy policy