Pages

Friday, 29 July 2016

Why Java is so important ?

While learning Java, some of us may get some sort of doubts like
  1. What makes Java so unique? 
  2. Why is it so important to learn Java? 
  3. Why Java is still preferred irrespective of the fact that there are several other Languages as well?
The concerned details are discussed below.. Enjoy Reading
I'll answer the first question in the next post. In this post, I'm going to answer the next two questions.

In recent days, several programming languages came into existence such as Python, Ruby,etc. and they seem to be more easier and more powerful than Java. Still, Java is ruling the programming world. The main reason is "Many well settled companies might have developed their company software in Java many years ago as it was the most robust language(Still it is). The new programming languages might be more powerful than Java.But, the companies are not ready to invest in transferring their software into a new programming for three main reasons.  
Firstly,  it might be a costly process.
Secondly, they might be satisfied with the features provided by Java as Java is a well established language.
And finally, the maintenance of the newly developed software becomes difficult as there are less number of people who are proficient in new programming languages.

Above three reasons combined with features of Java makes it one of the best programming language ever. And, it is expected that for the next 20 years, Java continues to be the language in demand. Hence,it is better for everyone to learn Java.

Any suggestions / corrections are welcomed. If you would like to contribute an article, please mail your content to : javaunveiled.contribute@gmail.com It will be published under your name.




Tuesday, 26 July 2016

Importance of Java Coding Standards

Hello Readers,

In this post, I would like to focus on the coding standards to be followed when you are coding in Java. 

Think of a situation wherein you have come up with a very optimized solution to a problem but you didn't follow the coding standards,your solution won't sell. It is regarded unworthy. So,in this section we are going to know the importance of Coding Conventions in Java.

Why to follow coding conventions in Java ?
  •  The straight forward answer is to make your code more Readable and Maintainable.
  • Any programmer from any corner of the world will be able to understand your code. If you didn't follow the coding standards, even you cant understand your code after few days.Hence, it is very important to follow the coding standards.
When to follow ?
  • Each and every time you code something in Java.
Rules to follow in Coding Conventions:
  • The first statement of a program has to be a package where in Java program reside.
  • Class names have to be a noun and they have to be started with a capital letter and followed by lowercase letters.If it consists of two words, the second word first letter has to be capitalized. It is called as CamelCasing. Eg: Employee, Student, MainClass,etc.
  • Interface name has to be an adjective and the rest is same as a Class.
  • Method name has to be a verb and first letter starts with a lowercase letter and follows Camel-casing.
  • Variable names have to be a noun with first letter has to be a lowercase letter and it follows Camel-casing.
  • CONSTANTS have to be in uppercase only. They have to be declared as public static final.
  • Java Beans should have private variables and should have getters ans setters methods to access them.
Bad Code:
 
 
 
Good Code:
 
 
Follow these conventions and have a happy time coding.. To err is Human. So, if I missed out any, comment it below. To share an article, ping me.



Introduction to the blog

Hello Readers,

I am writing this blog to make you to learn the basics of Java. I struggled hard to collect good material and get started with Java. I don't want to you to go through all that struggle. In this blog, I would like to share the materials I collected and I'll post some questions as well. I don't want this blog to be a monologue. I would like to hear from you in the form of comments.  If you would like to share some interesting article on Java or any interesting question/puzzle, click here to share with me. I'll share to the rest of the world under your name. Hoping to listen from you...!!