Tuesday, November 27, 2018

Best Cyber Monday Deals for Programmers

Hello Guys, I wanted to post this article a couple of days before but just couldn't manage to do it. Cyber Monday is almost over but there are still a couple of great deals for programmers who are running, particularly from PluaralSight and Udemy, two of the best online learning places.  If you want to invest some money in your learning and upgrade this is the best time to do so because prices have come down drastically.

Here are the two of such deals which I have also taken advantage to renew my subscription and add some good courses on my existing collection.


1. Save up to $150 on PluralSight

I wanted to let you know about a pretty sweet deal that PluralSight is running right now.

For the first time ever, they've knocked down the price on their PluralSight Premium plan by $150.

The Premium plan includes the entire PluralSight course library, plus their new certification practice exams, interactive courses, and practice projects to help reinforce what you're learning.

This new plan adds a lot of value—and with this promotion—at a great price too.

They've also knocked $100 off their regular annual plan.

Every serious developer must have a PluralSight subscription.  It's like the Netflix for Software developers.

=> Click here to save up to $150 on PluralSight

All the best with your learning

2. 

Monday, April 23, 2018

10 Example of String in Java



1. String IndexOf Example
2. String SubString Example
3. String Matches Example
4. String Length Example
5. String Empty Check Example

How to replace characters in String

How to remove whitespace from String in Java

How to find length of String in Java

How to check if String is Empty in Java

How to create SubString from String in Java

How to Split String in Java

How to check if String contais a word

How to

arraylist string example in java

java object string example

java string split example

java string to inputstream example

java string to int example

java string length example

java string to double example

java switch string example


10 points about synchronized in Java



1. Synchronized can only be applied to methods and code block, you can not make a variable, a class or an interface synchronized in Java.

2. When a thread enters a synchronized block or method, it acquire lock on the object method has been called. Similarly when thread exits the block, both normally or abruptly due to any error, it relinquish the lock.

3. Synchronized keyword not only provide mutual exclusion, but also provides visibility guarantee. Memory barriers are updated when thread enter or exits synchronized block or method. 

10 points about Exception in Java



1. There are two kinds of exception in Java, checked and unchecked exception. Any exception, which is subclass of java.lang.Exception but not inherited from java.lang.RuntimeException is known as checked Exception. On the other hand those inherited from RuntimeException are called unchecked exception.

2. Checked exceptions follow special symanatic rules in Java, they are literally checked by compiler during compile time.

3. All Exception are inherited from Throwable class.

4. Though Error are not inherited from RuntimeException they are also unchecked.

Why Constructor Injection is better than Setter Injection

There is no doubt that dependency injection is good, and offer several benefits. When it comes to inject dependency, there are two main ways, by using constructor and by using setter methods.


Constructor injection makes dependencies obvious
enforces order of initialization
makes wiring easy
supports testable code
more readable
enforce completeness


CreditCardProcessor ccp = new CreditCardProcessor();

OfflineQueue oq = new OfflineQueue()


Database db = new Database();

IS-A vs HAS-A Relationship Example in Java


IS-A means two classes are part of same inheritance hierarchy, while HAS-A means two classes are not part of same inheritance hierarchy but class A is composed using class B and uses it to provide certain functionality. 

Difference between SOAP and REST Style Web Service in Java

SOAP and REST are two ways to create web services in Java world, here are couple of key differences between REST and SOAP in Java