Showing posts from October, 2015
Binary tree traversal in Java - Preorder,Inorder,Postorder Iterative(non-recursive) preorder traversal of binary tree in Java Iterative(non-recursive) inorder traversal of binary tree in Java Iterative(non-recursive) …
A Tree is a non-linear data structure (as contrast to linked list, queue, stack are linear data structure) which forms hierarchical structure and order of elements are not important.In tree data structure, one node is parent node and all others nodes…
Singly Linked list fundamentals and associated operations (Create, Insert, Delete, Iterate) Display linked list in reverse order in Java Find length of Linked list - Recursive and iterative approach Reverse a singly linked list in Java - …
Printing even and odd numbers using two different thread is very basic java interview question from Thread handling. We have discussed it here - Print Even and Odd number using two different thread . The main agenda of this post is to display even an…
Topics covered 1. Install eclipse into Ubuntu 13.04 2. Generate hadoop2x-eclipse-plugin jar 3. Run a sample map- reduce program in eclipse. 4. HDFS location access via eclipse plugin In order to write map-reduce program in eclipse, we need t…
An explicit lock(Lock) and implicit lock(synchronize method & statement) is a tool for controlling access to a shared resource by multiple threads.Every object in Java has implicit monitor lock and synchronize(method & statements/blocks) tak…
Java support Input and Output(I/O) operations with characters/text and binary stream. Java I/O model is highly flexible so that it can accommodate data sources like File, Arrays, piped streams, etc. Since, ASCII (8 bit) character encoding was not suf…
File class (package java.io.*) is an abstract representation of file and directory pathnames. Each operating systems use system-dependent pathname strings to name files and directories(Windows use like this "C:\\DIR_NAME\\File_NAME" and Lin…
Topics covered 1. Pass program and VM arguments in eclipse 2. Pass program and VM arguments in Net beans 3. Pass program and VM arguments in Command line 4. Pass VM arguments in pom.xml. Sometimes when we execute out Java program/project, we n…