As we know that in order to maintain the Big data and to get the corresponding reports in different ways from this data we use Hadoop which is an Open Source framework from Apache Software Foundation based on Java Programming Language.Now Apache introduces the next version of Hadoop which named as Hadoop 2 so as this post is focusing on differences between both of these versions.Following are the main differences between Hadoop 1 and Hadoop 2.Sr. No.KeyHadoop 1Hadoop 21New Components and APIAs Hadoop 1 introduced prior to Hadoop 2 so has some less components and APIs as compare to that ... Read More
Widening refers to passing a lower size data type like int to a higher size data type like long. Method overloading is possible in such case. ExampleLive Demopublic class Tester { public static void main(String args[]) { Tester tester = new Tester(); short c = 1, d = 2; int e = 1, f = 2; System.out.println(tester.add(c, d)); System.out.println(tester.add(e, f)); } public int add(short a, short b) { System.out.println("short"); return a + b; } public int add(int a, int b) { System.out.println("int"); return a + b; } } OutputShort 3 Int 3
In any language or framework one of the most important and main feature is of searching the data. It not only denotes the performance of language but also represents in what manner the data is being stored. So specifically if we take an example of LINUX operating system there comes two of the important commands namely grep and fgrep.Both of these commands are used to search any string or regular expression in file, directory or even in multiple folders. Both these commands executes in such a way that processor starts analysing the target folder or destination and search for the ... Read More
In programming data type denotes the type and nature of data which is intended to be use by the user. It is the data type which compiler or interpreter going to deal with and provides corresponding storing location in main memory.Now on the basis of nature of data Data type is mainly of two types one is Fundamental Data type and other is Derived Data type. Both these data types are used in programming and are equally important when need to implement the business logic over the data.Following are the important differences between Fundamental data types and Derived data typesSr. ... Read More
We often need to customise the operating system to become useful to our own preferences like the language we want to use the time zone we are in the type of currency which would become the default currency in the OS etc. In this article we will see how to customise these options which is known as locale.Current localeWe can check the current locally by using the locale command as shown below. We get list of variables which can be reset to a different value as per our choice later$ localeRunning the above code gives us the following result −LANG=en_US.UTF-8 ... Read More
Sometimes there may be too many columns crammed into a single file. That makes it difficult to read the content of the file and point out which data belongs to which column. In order to have a better view, we ca use certain commands that will allocate space between the columns and also mark some separation characters that will make it clear to see the beginning and end of the column.Sample FileLets’ look at the below sample file which we will use to demonstrate the column command. $ cat iris.dataRunning the above code gives us the following result −Id, SepalLengthCm, ... Read More
There are three kinds of variables in Java −Local variablesInstance variablesClass/Static variablesLocal VariablesLocal variables are declared in methods, constructors, or blocks.Local variables are created when the method, constructor or block is entered and the variable will be destroyed once it exits the method, constructor, or block.Access modifiers cannot be used for local variables.Local variables are visible only within the declared method, constructor, or block.Local variables are implemented at stack level internally.There is no default value for local variables, so local variables should be declared and an initial value should be assigned before the first use.ExampleHere, age is a local variable. ... Read More
Following books are on top from popularity and content wise and are a good resource to learn java programming from beginner to advance level.
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, the modification done to the parameter passed does not reflect in the caller's scope while in the call by reference, the modification done to the parameter passed are persistent and changes are reflected in the caller's scope.But Java uses only call by value. It creates a copy of references and pass them ... Read More
A method may also return an array. For example, the following method returns an array that is the reversal of another array -Examplepublic static int[] reverse(int[] list) { int[] result = new int[list.length]; for (int i = 0, j = result.length - 1; i < list.length; i++, j--) { result[j] = list[i]; } return result; }
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP