Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

JAVA Web Frameworks Spring MVC, JSF, Grails, Struts 2, GWT - Pros and Cons

  Undoubtedly Java is the most demanded programming languages in the world today. A JS framework provides a solid foundation on which a programmer can build programs. It includes predefined classes and functions that are used to manag...

Java 8 Vs Java 9 : Comparing the Enhanced Features of Interface

  Java 8 came with the enhanced functionality to the Interfaces. Prior to Java 8, interfaces were contracted only with the abstract methods and subclass was obliged to implement the contract. Child class has to implement the abstract ...

Java - How to Fix or Avoid Incompatible Types Possible Lossy Conversion Error?

In this blog, we will see why we get an error while we perform any arithmetic operations on two operands with type byte or short. we find the following error while compiling the source code in Java. In the case of type short: Let say we add tw...

How to Use Javadoc tool to create documentation API

Creating a documentation of a Java source file is not a big task, it can be done in just 3 steps which are explained below. We use Javadoc tool to create documentation API for a java source file. Let's create a file with class name Documen...

Different ways of writing main method in Java

Here we will learn different ways in which we can write the main method in JAVA. Different ways of modifying the main method in JAVA are mentioned below and displayed with the help of example: 1) Making changes in the sequence of modifiers, me...

How to Add Elements, Increase Size & Capacity of a Vector Class in JAVA Collection Framework

In this blog we will understand about Vector Class in Collection Framework. We use vector class to facilitate the growable nature of collection of objects. Like array we can access any member of the collection using the integer index. The size of...

Instantiating and Manipulating LinkedList in Java with Examples

  Introduction:   In this blog we will learn about LinkedList.In general terms, LinkedList is a data structure where each element consist of three parts. First part represents the link to the previous element, second part r...

List of Best Tutorial Sites to Learn JAVA for Complete Beginners

  There are lots of on line resources that can be very helpful in learning Java programming language. Here I am mentioning some good sites that will help the learners, who are starting from scratch. Well it's very much required th...

How to iterate over elements of ArrayList in java

In this blog we will learn how to iterate over the elements of a collection (here we considered ArrayList) using generics and without generics. First we will go through the process of using iterator method. Iterator() method is included by eve...

Instantiating and Manipulating ArrayList in Java

In this blog we will learn about ArrayList. ArrayList is one of the collection class of collection framework. It is a way of storing elements dynamically in an array. It implements the List interface and extends the AbstractList class. Important ...

Collection Framework and Interface in Java

In java “Collections” helps us to store and manipulate the collection of objects. All the operations such as manipulation, deletion, searching, sorting, insertion can be performed quickly with the help of “Collections”. Ja...

Thread and instantiating thread in java

In this blog we will learn about importance of Thread class in java and instantiating thread. Every java program consists at least one thread i.e. the main thread. The Java Virtual Machine always creates a main thread and calls the main method in...

Array and it's type in java

In this blog we will learn about array and it's type in Java. Array is defined as a collection of similar type of elements.          Array are seen as a collection of elements these elements belongs ...

Generate Simple PDF using iText

Generate Simple PDF using iText: Some time we need to generate documents using our application. The document could be like pdf, word, excel etc. To generate these documents we need to take help of third party api. In this article we talk about...

Causes of Unprotected Transport of Credentials

Causes The main cause of Unprotected Transport of Credentials vulnerabilities points to not properly using TLS for communication between the end-points. This allows an attacker to perform man in the middle or phishing attack. Such flaw can occ...

Unprotected Transport of Credentials

Unprotected Transport of Credentials are the shipping of sensitive information through some communication channel. For instance in Log-In pages that are not using satisfactory measures to defend the user name and password while they are in transp...

What is singleton pattern and double checked locking ?

Singleton pattern is basically used to maintain only a single object of a class in the application. This uses private constructor and static method to return class instance like this : public class SingleTon { private static Singl...

What is Abstract factory pattern with example?

We know that factory pattern provides single level abstraction and used to create object easily but in a case of more security, we can use one more level of abstraction by using the abstract factory pattern. we can say that this provides factory ...

What is Factory Pattern?

Factory pattern is one of the most used design patterns in java with the help of this pattern you can create object easily by using this concept of oops. Example of Factory pattern : 1. Create an interface 2. Create class that 'll ov...

Cause of Insufficient Sessions Expiration

Causes The main cause of Insufficient Sessions Expiration vulnerabilities gives the Implications towards lack of understanding of security measures. While building a web application that interacts with the clients, it is vital to ensure that t...

Arraylist vs Vector

Basic difference between the two is the Synchronization. Vector is Synchronized and Arraylist is not. If your application will  be having single thread of execution use Arraylist else Vector. ArrayList is fast because its not synchronized...

Insufficient Session Expiration

Overview Insufficient session expiration is an attack that happen when a Web application let an attacker to utilize an used session ID rather than to force an application to create new Session ID. This is mainly required for authorization purp...

Impact of Exposed Session Token

  Hello readers, in this blog, we will see the Major Consequences of the Exposed Session Token many causes. Impact of Exposed Session Token The main consequences of such attack can be : Using this Vulnerability, An attacker ca...

Exposed Session Token

Overview Exposed Session Token is the attacking technique via session Token used within the Application. Generally, the websites makes use of Session cookie and a session ID for validating each Sessions. Session begin from the time when the Us...

Prevention of Exposed Session Token Vulnerabilty

Hello readers, in the previous blog of Caused of Exposed Session Token you have seen the factors that are major causes of such attack. Now In this you will see what steps we can take to prevents the Exposed Session Token attack. Solutions I...

Cause of Exposed Session Token

Hello Readers, todays we will discuss about the Exposed Session Token Vulnerability and the Causes of such attacks. Lets discuss about the same in detail . Overview Exposed Session Tokens is an attack that grants an attacker to seize a vali...

Integrate Apache2 and Tomcat 7 Using mod_jk

As we know our most of the projects in Java is run using Tomacat application server. Sometimes we also need some web server like apache2 for other functionalities like wordpress integration. In such situation our project need both of the server ...

OS Command Injection

Overview OS Command Injection is an attacking technique that occur when attacker direct OS commands in the form fields of Web interface to exploit the web interface. If the web interface is not properly validated then there are chances that th...

XQuery Injection

Overview XQuery Injection is an attacking technique that occur when trusted data is concatenated into XQuery queries. This will allow the attacker to run any arbitrary queries that will affect the XML database. In other words, we can say this ...

Multiple Inheritance in Java with Example

Hello!! As we know that java does not support the multiple inheritance but java 8 provides a way by which we can use multiple inheritance. It provides a default method to do this job. In java 7, interface are used to declare the contra...

How to read a text file using Scanner in Java?

Hello!! As we know that their are multiple way to read the text file in java. BufferedReader class is generally uses to read the text file. FileReader, BufferedReader, FileInputStream is used to reade the text file in java ...

Regular Expression in Java

Hello!! Regular Expression is part of the Automata, and also called rational expression. We use it for finding the match of the string like validating the Email address, Password etc. It uses some special sequence of the character for mat...

Travelling Salesman Problem

Hello!!! Travelling Salesman Problem is for finding the shortest possible root that visit every node in the graph and return to the origin point. It is used to find the shortest path. For example:- In this graph, Their is many way to rea...

How to Print All Leaf Node of Binary Tree

Hello Everyone!!!   In order to solve binary tree problem of leaf node, we should know that what is leaf node? Leaf node is node of the binary tree whose have no left and right child means whose left and right child is null. It...

Email Injection

Hello Readers, In this blog we are discussing on how one use it to send out spam messages from your email server using the Mail/feedback form on your Website. Overview An Email Injection is a security Vulnerability that is possible when we ...

Concatenate two arrays in Java

Concatenate two arrays in Java is quite simple you can use single liner solution from the Apache Commons Lang library.   ArrayUtils.addAll(T[], T...) For example if you have two array firstArray and secondArray, you would have code ...

java.io.FileNotFoundException: the system cannot find the file specified

If you face following error: "java.io.FileNotFoundException: the system cannot find the file specified" and error similar to below is visible in logs: Exception in thread "main" java.io.FileNotFoundException: Report.PDF (The s...

How to make https to Dropbox Redirect URL

Hello Guys, As Dropbox was not allowing HTTP URL's for callback or redirect URL's (as http was only allowed for localhost). I added below redirect URI in dropbox App for local machine : http://localhost:8080/DropboxTest/oauth_c...

NoSQL Database

Hello Readers, In this blog, I am discussing the No-SQL Database. Let's see in details about it and types of Database.   Overview The NoSQL is an acronym for Non SQL or Not only SQL"database. This types of Database helps in...

Use of stream instead of for loop in java 8

We all know about the use of For loop and for each loop that is used to iterate all elements in list or collection but some time in case of n numbers of items loop traverse till nth item that is time consuming but after java 8 we have some strong...

Default methods and static methods uses in Interface.

We know that interface provide methods without body or functionality but in abstract class we can provide default functionality of methods. So in interface we can't give method body and can't declare ant static method. But in Java 8 no...

Tower of Hanoi Implementation in Java

Hi Readers, In this blog i will provide you the Java solution for the famous Tower of Hanoi problem using Stack. Problem definition Tower of Hanoi is a mathematical puzzle. It is also known as Tower of Brahma or Locus' Tower. Th...

Insertion sort implementation in Java

Hi Readers, This blog is to help you to understand how insertion sort works. Insertion sort is a simple sorting algorithm which is good to sort short list. Real life example of insertion sort is sorting of playing cards, Like we pick a card...

Fisher-Yates Algorithm for Array Shuffling

Hi there, Here in this blog I am going to provide Java implementation of Fisher-Yates Algorithm for array shuffling. Fisher–Yates shuffle algorithm as named after Ronald Fisher and Frank Yates. It is also known as Knuth sh...

Taking a screenshot of screen using Java and save it in image format

Hello there, In this blog I will provide a solution to how you can get screenshot of your screen and then save it at any location of your choice for this, we will use java.awt.Robot for creating an image which will generated by readi...

Adding watermark to your PDF using Java

Hi there, In this blog we will see how to add watermark images to our PDF files using Java.  Watermarks have been used to discourage counterfeiting. To generate watermarked PDFs we need an additional itext.jar file to be in...

Getting OS-level system information using Java

Hello readers, Here below is a small Java program to extract information such as the current disk space used, CPU utilisation and memory used in the underlying OS. To get information related to the disk usage you can also use java.io.File clas...

Read CSV data using Java

Hello In this blog I will give a demo about how to read CSV data from a file. For this purpose I will use Opencsv library. Opencsv  is a very simple csv (comma-separated values) parser library for Java. You can download  the binar...

Counting Sort

Hi, This blog is to help you to understand counting sort in easiest manner, counting sort can sort the range in linear time but we have to provide the starting element and last highest element of the range (means elements in the rang...

PDF generation using Apache FOP

Hello readers,       This blog is to help you to learn how to generate PDF using Apache's FOP in Java. Apache FOP ( Formatting Object Processor ) which uses XSL-FO to create PDF file of our document. Here is a s...
prev 1 3 14
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: