Installing default JRE/JDK Step 1: sudo apt-get update Step 2: sudo apt-get install default-jre Step 3: sudo apt-get install default-jdk
Continue readingCategory: java
RESTful Web Services with Java (JAX-RS) using Jersey Example
In this tutorial we will see restful web services in java using jersey example . This is restful web services
Continue readingBasic Unix Commands For Java Developers
1. cd cd Directory name 2. cd .. go to just one level above parent folder 3. rm -rf repository/
Continue readingConvert String To Integer
Convert string to a number in java public class ConvertStringToInteger { public static void main(String[] args) { String number=”123″; int
Continue readingExpand a given array
Write A program to expand a given array input-{‘A’,’3‘,‘B’,’2‘,’C’,’1‘} output-{A,A,A,B,B,C} public class CountArray { char[] arr = new char[100]; int
Continue readingHow To Read JSON In Java (Set 3)
user.json {“employees”:[ {“firstName”:”Rahul”, “lastName”:”Dhiman”}, {“firstName”:”Anna”, “lastName”:”Smith”}, {“firstName”:”MS”, “lastName”:”Dhoni”} ]} TestJson.java import java.io.FileReader; import java.util.Iterator; import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser;
Continue readingHow To Read JSON In Java (Set 2)
user.json {“employees”:[ {“firstName”:”Rahul”, “lastName”:”Dhiman”}, {“firstName”:”Anna”, “lastName”:”Smith”}, {“firstName”:”MS”, “lastName”:”Dhoni”} ]} TestJson.java import java.io.FileReader; import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; public
Continue readingJSON Tutorial
What is JSON? JSON VS XML How to Read JSON In Java How To Read JSON In Java (Set 1)
Continue readingHow To Change File Permission Using Java
In last tutorial we learn How To Check File Permissions In Java ,Now We learn how to change file permission
Continue reading