Category: Java
For loop in Java
The for loop in java lets the developers to iterate over a list of values . The for loop executes until the exit condition matches . Following the syntax of the for loop in java for (initialization; condition;increment){statement(s)} The initialization expression is used to initialize the loop and is executed as soon as the loop begins. The termination condition is verified every time and the…
Top 10 Open source Full Text Search libraries
Are you looking at implementing the full text search with in your website ? . In this blog post , we will list out the top 10 open source full text search libraries which you can use in your website. Top 10 Open source Full Text Search libraries 1. Lucene Lucene is one of the most popular java based search engine library that offers real…
Microsoft Band and Android(Java) – Connect to the Band
Below is the sample code snippet demonstrating how to connect to the first microsoft band that is paired using the BandInfo and BandClient object. How to Connect to the Microsoft Band from android application using Java ? How to get the list of paired bands from the android application using java.
While Loop example in Java
The while loop in java lets the developers execute a block of statements continuously until a particular condition is true . The syntax of the while loop in java can be written as while(expression){statement(s)} The while loop evaluates the expression which returns true and executes until the expression returns false. While Loop example in Java Below is a sample code snippet demonstrating the usage of…
Java – How to get the String representation of the Boolean value in Java ?
Problem statement You need to convert the Boolean value to string and display the string representation of the same. Solution Use the toString static method defined in the Boolean class for the conversion. The output of the above program is Abundantcode.com Java Tutorials false
JAR file operations in Java
Below are some of the common JAR File operations in Java. JAR file operations in Java jar cf This command creates a JAR file.Syntax : jar cf jar-file input-file jar tf This command is used to view the contents of the JAR file.Syntax : jar tf jar-file jar xf This command is used to extract the contents of a JAR file.Syntax : jar xf jar-file
How to Compare two arrays in Java ?
You can compare arrays in java using the Array.deepEquals() method . The Array.deepEquals() method in Java lets the developers to compare array objects and return true if both the arrays contains the same objects. How to Compare two arrays in Java ? Below is a sample code snippet demonstrating the usage of Array.deepEquals() to compare two arrays. Output Comparing input and input2————————–trueComparing input and input3————————–false
Java Program #1
What is the output of the following Java program? Output a b c
How to Check if Integer is a multiple of a number in Java?
If you want to check if the integer value is a multiple of a number in Java , you can use the modulus (%) operator . If you get the result as zero , then it is considered as multiple of a number. How to Check if Integer is a multiple of a number in Java? Below is a sample code snippet demonstrating the usage…
Top Java based Content Management Systems (CMS)
If you are a Java developer and looking for the top Java based Content Management Systems (CMS) . Here we go. Top Java based Content Management Systems (CMS) Below are some of the top content management systems (CMS) that are based on Java platform. Some of them are open source and few are commercial software’s. Apache Roller Hippo CMS Alfresco OpenWGA OpenCMS XWiki LogicalDoc Jahia…
Best Java Equivalent for LINQ (C#)
LINQ Query and Lambda expressions are one of the popular features of C# which helped the .NET developers in many ways. If you are a Java developer and wondering is there anything similar to this in Java ? ,this post will provide some insights on the additional APIs which could bring in the similar functionality Best Java Equivalent for LINQ (C#) jaque Another Java integrated…
Java – How to declare Hexadecimal literal ?
Problem statement You need to declare an Hexadecimal literal in Java and display the result on a console window. Solution Hexadecimal numbers can contain numbers from 0-9 as well as characters A-F where A-F represents 10-15. You can prefix the numbers with 0X to denote it as hexa decimal number as shown below. The output of the above program will be 10 21