Don't wanna be here? Send us removal request.
Text
Spread operator in JavaScript
I loved the new spread operator of javascript that came with ES6. Basically, it has three dots. You might be … More via WordPress http://ift.tt/2h6mxsF
0 notes
Text
Spread operator in JavaScript
Spread operator in JavaScript
I loved the new spread operator of javascript that came with ES6. Basically, it has tree dots. You might be familiar with the varagrs of Java. However, it’s more than varargs. Let me give you some examples-
Let’s say you have a variable-
var a= [1,2,3,4]; var b = [5,7];
and you wanna concatenate a and b . There is a function to do that –
var d = a.concat(b) ; console.log(d); Output: [1, 2, 3,…
View On WordPress
0 notes
Text
Parallel Array Sorting
JDK enhancement proposal 103 brings a new way of array sorting which uses the Fork/Join parallelism technique to provide sorting … More via WordPress http://ift.tt/2gr0ddD
0 notes
Text
Parallel Array Sorting
JDK enhancement proposal 103 brings a new way of array sorting which uses the Fork/Join parallelism technique to provide sorting of arrays in parallel. This new feature is going to be added in our forthcoming Java 9 release.
Currently, we have two sorting implementations, one sorts arrays and another sorts collections. These two implementations perform sort in a single thread. The parallel array…
View On WordPress
0 notes
Text
Removing items from ArrayList in java 8
As we know ArrayList implementation of List interface store elements in an Array under the hood. Removing elements from ArrayList is a bit costly which is the order of n^2. Let’s say I have a list of integers and I … Continue reading → via WordPress http://ift.tt/2dNHHte
0 notes
Text
Removing items from ArrayList in java 8
Removing items from ArrayList in java 8
As we know ArrayList implementation of List interface store elements in an Array under the hood. Removing elements from ArrayList is a bit costly which is the order of n^2. Let’s say I have a list of integers and I wanna remove all the nonprime number from the list. Typically what we do is, use iterator and while loop to that. We can’t iteration/removing at the time with for each loop, because we…
View On WordPress
0 notes
Text
Things to consider before diving into Java Programming Language
I would like to point out a few things first – Java has the largest ecosystem among all the languages. So it may take you some time to get used to it. Give it 2 years, and it will be … Continue reading → via WordPress http://ift.tt/1SdCZHT
0 notes
Text
Things to consider before diving into Java Programming Language
Things to consider before diving into Java Programming Language
I would like to point out a few things first – Java has the largest ecosystem among all the languages. So it may take you some time to get used to it. Give it 2 years, and it will be worth the effort. ( Though this should be true for every programming language) If you want to get quick output, I’m afraid, java is probably not the right tool for the job. Java is essentially a lower level language…
View On WordPress
0 notes
Text
The magic word in Java : CAFEBABE
Java compiler compiles a Java Source code into bytecode and stores it in a .class file which is then get executed by JMV. Well, we all know this, but do you know that all Java classes start with a magic word … Continue reading → via WordPress http://ift.tt/23ymGIj
0 notes
Text
The migic word in java : CAFEBABE
The migic word in java : CAFEBABE
Java compiler compiles a Java Source code into bytecode and stores it in a .class file which is then get executed by JMV.
Well, we all know this, but do you know that all Java classes start with a magic word called – CAFE BABE ?
In case you’re curious and interested to know why, bear with my attempt to inform you something interesting.
Go to the vim(whatever editor you like to) and with the…
View On WordPress
0 notes
Text
How to change the brightness of LCD display from command line in Ubuntu
Open your terminal and type this – If you have multiple monitors, you will have output as – here, VGA1 and HDMI1 are your display. If you want to change the brightness of ‘VGA1’ type following The brightness ranges from … Continue reading → via WordPress http://ift.tt/1K41Vs4
0 notes
Text
long/double are not atomic in Java
So I have been reading a lot of texts lately. Java Concurrency in Practice is probably one of the best book written for concurrent programming in Java. Though this book is written prior to Java 7, but it is still … Continue reading → via WordPress http://ift.tt/1XOF7rY
0 notes
Text
long/double are not atomic in Java
long/double are not atomic in Java
So I have been reading a lot of texts lately. Java Concurrency in Practice is probably one of the best book written for concurrent programming in Java. Though this book is written prior to Java 7, but it is still valid and did a excellent job explaining all the fundamentals.
While reading, I came across a paragraph entitled “Nonatomic 64-bit operations“. I actually never knew that in java 64-bit
View On WordPress
0 notes
Text
Custom JSON Deserialization with Jackson
There are times when you want to take a control over the normal flow and you want to do things your own way. This quick tutorial will help to know how to take over control from Jackson json deserialization and write your own deserializer. Continue reading → via WordPress http://ift.tt/1OsbMvy
0 notes
Text
Why 1000 == 1000 returns false but 100 == 100 returns true in java?
This is probably one of the well discussed topic, but I found it interesting. if you run the following code- You will get – Here is the basic: we know that , if two references point to the same object, … Continue reading → via WordPress http://ift.tt/1Leszxx
0 notes
Text
New Integer/Long parse method in java 9
I have just got install the Java 9 early access release and started playing around. I know that, this not the major release and it is more of a bug fix release with a few tiny features. However, I found … Continue reading → via WordPress http://ift.tt/1PD14Ee
0 notes
Text
New Integer/Long parse method in java 9
New Integer/Long parse method in java 9
I have just got install the Java 9 early access release and started playing around. I know that, this not the major release and it is more of a bug fix release with a few tiny features. However, I found two additional pares method for long/Integer – 1. public static long parseLong(CharSequence s, int beginIndex, int endIndex, int radix) throws NumberFormatException {} 2. public static long…
View On WordPress
0 notes