Java SimpleDateFormat different date formats
How to get the current date and time as String value. SimpleDateFormat get date and time in different formats. Read the date as String value. SimpleDateFormats.java package com.chillyfacts.com; import java.text.SimpleDateFormat; import java.util.Date; public class SimpleDateFormats { public static void main(String[] args) { SimpleDateFormat date_format=new SimpleDateFormat(“dd-MM-yyyy EEEE hh:mm:ss a”); Date date=new Date(); String current_date_time=date_format.format(date); System.out.println(current_date_time); } …
java if statement source code-Simple Java Programs
In this video I have shown the four common different if statements with example source code. The four if statements are, 1. if statement 2. if-else statement 3. if-else-if ladder 4 .nested if statement Project Structure If_Statement.java package com.chillyfacts.com; public class If_Statement { public static void main(String[] args) { int i=15; System.out.println(i>10); if(i>10){ System.out.println(“i is …
Java Simple Hello World Program in Eclipse
Hello World program in Eclipse Example. Follow the below steps, Go to File > New > Java project Project Structure HelloWorld.java package com.chillyfacts.com; public class HelloWorld { public static void main(String[] args){ System.out.print(“Hello World!!”); } } Out put in console Hello World!! Download the project here, HelloWorld.rar
How to Generate or Read QR code Dynamically using JAVA
This project is developer in zxing API. Project Structure in Eclipse, The 3 jars used are, 1. zxing-core-2.0.jar 2. zxing-1.7-javase.jar 3. MySQL Connector The below code will generate the QR code with data chillyfacts.com Create_QR.java package com.chillyfacts.com; import java.io.File; import java.util.HashMap; import java.util.Map; import com.google.zxing.BarcodeFormat; import com.google.zxing.EncodeHintType; import com.google.zxing.MultiFormatWriter; import com.google.zxing.client.j2se.MatrixToImageWriter; import com.google.zxing.common.BitMatrix; import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; …
How to Create PDF dynamically with Images using JAVA
In this video tutorial I have shown how you can generate PDF using JAVA. This project need the jar itextpdf-5.1.0 jar to be added in Class path Project Structure Code to create simple PDF File Create_PDF.java package com.chillyfacts.com; import java.io.File; import java.io.FileOutputStream; import com.itextpdf.text.*; import com.itextpdf.text.pdf.PdfWriter; public class Create_PDF { public static void main(String[] args) …
Free Library Management System project in Java,Mysql Source Code in Net Beans IDE
Download the source code here LMS.rar 2017_data.rar Free Library Management System project in Java and Mysql Source Code in eclipse IDE
How to Parse Nested JSON using JAVA
In this video I have shown how to Parse nested JSON response array using JAVA. Using two real http request example, 1. ipinfodb.com: This website will give JSON response of IP location details for the HTTP request we give. 2. google map api : Google Map API will give JSON response of the Location details …
How to run a task periodically in Java without any Java IDE
In this video I have explained solution for your following queries, 1. How can you run a java program without any JAVA Editor. 2. Schedule any task with your java program. 3. What is the use of Runnable Jar File. 4. How can you create Runnable Jar File. The below code with create notepad file …
Convert Java Object into JSON and JSON into Java Object | Jackson API
In this video I have shown how to parse JSON Object to a JAVA Object using JACKSON API. Project Structure, In this project we use 2 jars, 1. com.fasterxml.jackson.core.jar 2. com.fasterxml.jackson.databind.jar Add these jars to build path of Project For testing we have registered with website http://api.ipinfodb.com. After registering we will get the API Key.This …
How to Create custom Facebook Share Button
In this video I have shown how to create a custom designed facebook share button. As shown in the video we need to create an app in the facebook developer site and get the facebook APP ID. You can create any number of share buttons just with one APP ID. No need to create APP …