Get Date Using JavaScript

We can get Date using JavaScript built in object Date. In below example we will see how to get date using JavaScript Date object. example to get current date using JavaScript in dd-mm-yyyy format:- var today = new Date(); var day = today.getDate(); var month = today.getMonth()+1; //first month starts from 0 var year = … Read more

Enum Types in Java

Enum was introduced in java 5. Enum types in java is a special type of class to define collection of constants. Variables in enum are constants so there name should be in uppercase letters. In java we define an enum type by using the enum keyword. Enum types in java is used to represent a … Read more

Custom Exception in Java

Custom Exception in Java can be created by Extending the Exception Class. By Creating Custom Exception in Java We can Provide Some Custom Information. Program to Create Custom Exception in Java:- public class TestCustomException { public static void main(String[] args) throws CustomException{ int number = 0; try{ System.out.println(“program to create custom exception in java”); checkException(number); … Read more

Bubble Sort in Java

Bubble Sort in Java in a bubble sorting algorithm, in which elements of the list gradually rise or bubble to their proper location in the array. Bubble sort algorithms cycle through a list, analyzing pairs of elements from left to right, or beginning to end. If the leftmost element in the pair is less than … Read more

Merge Tables Using JQuery

In Below Example We will See how to Merge Tables Using JQuery. The Code can be Modified Accordingly if There are More Than Two Tables Code to Merge Tables Using JQuery: <html> <head> <title>Merge Tables Using JQuery</title> <script type=”text/javascript” src=”jquery.com/jquery-1.8.2.js”></script> <script> $(function() { $(‘#btnMerge’).click(function() { $(‘#table3’).html($(‘#table1’).html()); $(‘#table3 > tbody:last’).append($(‘#table2 > tbody’).html()); }) }) </script> </head> … Read more