Tag Archives: Java

Tea-Time Java Quiz #1

Interview questions

Tea-Time Java Quiz is intended to be quick 5 questions Java quiz which one could quickly take from time-to-time to test their Java knowledge on the ongoing basis. [WpProQuiz 2]

Posted in Java. Tagged with .

Java Interview Questions (Part 1) – Rookies Series

The article (first in the series) aims to present some tricky interview Java questions that could help you score high in your next Java interviews:    Programming fundamentals Question: What is difference between object-oriented programming and functional programming? Answer: Following pages present good perspective on the differences: http://stackoverflow.com/questions/6720348/difference-between-oop-and-functional-programming-scheme http://c2.com/cgi/wiki?OoVsFunctional    Java Objects Question: What is difference between comparing two objects using equals method and “==” operator? Answer: http://stackoverflow.com/questions/5848370/equals-and-operator-in-java Question: What is the significance of equals and hash method in Object class? Answer: http://www.javaworld.com/article/2074996/hashcode-and-equals-method-in-java-object—a-pragmatic-concept.html    Collections Question: What is difference between LinkedList and ArrayList? When would you want to use one and not the other? Answer: http://javarevisited.blogspot.in/2012/02/difference-between-linkedlist-vs.html Question: How come you …

Continue reading

Posted in Freshers, Java. Tagged with , .

Why & When Use Java 8 Compact Profiles?

The article presents a perspective on different aspects of compact profiles in Java 8 including relevance of this feature in the first place and, when would you want to use it. As I am also getting up to speed with compact profiles, I do understand that there could be further detail to it that I might have missed and thus, would appreciate if you could share your perspectives as well. What is Compact Profile? As defined on Oracle compact profile overview page, compact profile enable reduced memory footprint for applications that do not require the entire Java platform. In Java 8 release, compact profiles provide three different groupings of libraries …

Continue reading

Posted in Java, News. Tagged with .

Java 8 to Face Challenges with Enterprise-wide Adoption

The article represents some of the challenges that an enterprise might face in relation to the adoption of Java 8 across different line of businesses (LOBs). Buy-in from Business & Technology Stakeholders Unlike previous Java releases, Java 8 release has come up with some unique features which are there to sort out some of the existing technical challenges (such as Lambda expressions, Collector APIs for map-reduce transformations, Nashorn engine etc) and, challenges in relation to making Java friendly to different devices and modular (compact profiles) in coming future. The primary issue that business and technology stakeholders are going to face is to find out and get convinced with business and technology relevance …

Continue reading

Posted in Java. Tagged with .

Java Developers Readiness to Get Started with Java 8 Release

The article represents different set of information that Java developers (working on 5, 6, 7 versions) may need to learn prior to getting started and make best use of Java 8 features. In case, you feel there are other topics that developers need to look beforehand, please suggest. Following are different concepts which Java developers working with earlier versions of Java need to understand very clearly in order to get started comfortably with Java 8 features. Functional programming concepts Learning functional programming concepts would help you learn Java 8 flagship feature such as Lambda expressions. In short, Lambda expressions helps you treat functionality (represented as code) as data which you …

Continue reading

Posted in Java, News. Tagged with .

Java Lambda Expressions Explained with Examples

java8 lambda expressions

The article represents different viewpoints on Java Lambda Expressions (Java 8) to help Java developers understand what, why, when, how of Lambda expressions. Lambda expressions are nothing but a way to abstract behavior unlike the object-oriented programming which is based upon the abstraction of data in form of object. Lambda expressions are used to assign the behavior to a variable or pass the behavior in between method calls instead of wrapping the behavior in an object and working with the objects. Take a look at the following example to understand the Lambda expressions better.Remember, the famous addActionListener method on button to capture the button-click event and, take action when the …

Continue reading

Posted in Java. Tagged with .

5 Tricky Interview Questions for Java ArrayList

I have been involved in many a java interviews and following are five tricky ones where I found several junior to mid-level Java developers faltering once in a while. Thus, I thought to put an article around these questions to help junior Java developers make familiar with these questions. The article presents the 5 tricky interview questions in relation with Java ArrayList, I believe,  could get the interviewee score some browny points, if answered well. Let me know if you agree and would like to add another set of questions to the list below: How does the size of Arraylist increases automatically? Could you share the code? This is the most …

Continue reading

Posted in Java. Tagged with , .

6 Java Exceptions that Haunts a Newbie Java Developer

exceptions

Every now and then, I come across various newbies Java developers who are found to get stuck with some of the following common exceptions where I need to explain them all over again. I do believe that this is same with many other senior Java developers who try and help these rookie developers to deal with following exceptions. Thus, I thought of coming up with this article and use it for myself going forward. Please feel free to comment or add to the below exceptions list. NoClassDefFoundError: This is one of those exception, with message such as Exception in thread “main” NoClassDefFoundError, that has been most commonly found to welcome newbie Java developers to …

Continue reading

Posted in Java. Tagged with .

3 Java 7 Features Aimed to Enhance Code Quality

java 7 features

There are several new features that have been released in Java 7 to take care of several developers’ requirements. However, interestingly, I have figured out that three of those 7 features are primarily aimed to enhance following key characteristics of code quality. Please feel free to share your opinion on them. Code Readability Code Duplication Code Complexity Following is the detail of those 3 Java 7 features: Underscore in Numeric Literals (Enhances Code Readability) This feature primarily takes care of code readability, and hence, code usability,  having large numbers having several digits. For example, credit card number, social security number etc. Many a times, we come across large number which seem to have an embedded …

Continue reading

Posted in Java. Tagged with .

Top 5 Java Forums Worth Frequent Visits for Newbie Java Developers

java forums

If you are a newbie Java developer, and want to get your queries clarified quickly along with learning Java in a fast-paced manner, you may plan to visit to some of the following forums on the regular/frequent basis. These forums have been reviewed and listed below on the basis of number of discussion threads and participation/replies from the forum members. These forums could also be frequented by experienced Java developers owing to the fact that various interesting topics related to advanced level Java are also discussed in these forums. [adsenseyu2] CodeRanch.com (http://www.coderanch.com/forums): A very active forum, for Java developers of all expertise level, I personally found this best of the …

Continue reading

Posted in Freshers, Java. Tagged with , .

Tools to Obfuscate Your Java Classes

If you have got the requirement to demonstrate your tool built using Java on client machine (third party computers) by deploying your entire tool, and you are worried if your critical application jar files consisting of Java classes could get decompiled and seen by others, you could use some of the following tools: Proguard could be used to obfuscate the class files. ProGuard is a free Java class file shrinker, optimizer, obfuscator, and preverifier. In the process of obfuscation, it renames the remaining classes, fields, and methods using short meaningless names.  JBCO (Java ByteCode Obfuscator) could transform code to be more complex, esoteric, or otherwise obscure in order to hinder reverse-engineering nad decompilation …

Continue reading

Posted in Java. Tagged with .

Top 4 Java Static Code Analysis Tools

Static Code Analysis

[adsenseyu2] Before going over some of top static code analysis tools for Java, lets quickly look at why do we need static code analysis in the first place? Following are some of the reasons: Rules compliance: Pre-defined rules can be set as per the coding standard and automated static analysis could be run to figure out rules violation. This does cut down on the manual code review for the related rules. Code quality metrics: The static analysis could be used to measure some of the following based on which software code quality can be measured: Code complexity Unit test coverage Re-usability Duplication Reports: Creates management reports that can be used …

Continue reading

Posted in Software Quality. Tagged with , .