Print/list all methods/functions of class in java (example)
Given a class in java containing public,private & protected methods. We will declare a Person class containing: Public methods. Private […]
Given a class in java containing public,private & protected methods. We will declare a Person class containing: Public methods. Private […]
Given a class in java containing public,private & protected contructors. Get/list/print all constructors (prive,protected & public) of a class using
Given a class containing public methods in java. Get/Print/list public methods/functions of class in java (example) using class Class.
Given an instance of class in java. We would like to find out the class name of an object. We
Given the parent child class hierarchy in java. We would like to compare the instance of classes at run-time. We
Given an application in java. We would like to create the instance of classes by specifying class name. Instances of
We would like to list all available time zones supported by JDK. TimeZone represents a time zone offset, and also
We would like to get/set the default timezone in java. TimeZone represents a time zone offset, and also figures out
Given a local file present on our file system. We would like to convert path of a file to URL
Given a key value pairs of properties in java.Create or write or dump properties to property file using Properties class (example)
Given an array of user defined objects/POJO in java. We would like to sort user defined objects on certain properties/data
Given a source bean or object in java. We would like to copy properties from source bean into destination bean
Given Locale for given language & country code in java. We would like to display currency code & symbol for
Given a java application supporting different languages like French,German, Korean, Japanese, English etc. We will localize strings for each language
CopyOnWriteArrayList is thread-safe variant of ArrayList. New copy of underlying array is created when any add, set (or modification) operations
Scanner class is a text parser, which is used to parse primitives & strings using regular expression. Scanner split the
Scanner is text parser which used to parse primitives & strings using regular expression. Scanner split the input into token
Inter thread communication is very common phenomenon. There are many ways to achieve inter thread communication. In current post, we
Given a file in java, check read, write & execute permissions of a file. We would like to check whether
Create new file & directory/folder using File class in java (with example). We will create new directory & file using mkdir & createNewFile respectively
List all system drives in java. We will find out the free (available) , used and total space of each
Given a zipped or compressed file in java. Write a program to unzip or decompress the contents of zip file
Given an string representing unique identifier. We would like to convert string to corresponding universal unique identifier (UUID) or Globally
Universal unique identifier (UUID) or Globally unique identifier (GUID) is unique identifier (or Id). GUID represents the unique id(s). Typically
Generate guid or uuid using RandomBasedGenerator class of Java UUID Generator (JUG) library. In current post, we will generate random uuid
Generate time based uuid in java using JUG (Java Uuid Generator) library. JUG library provides couple of generator viz TimeBasedGenerator & RandomBasedGenerator. In
Given hostname in java, we would like to find out network details of host. JDK class InetAddress provide APIs to
Given a zipped or compressed file in java. We would like to display or list the contents of zipped file.
Given an input directory containing files and sub-directories. We would like to compress or zip all files present in a
Given the input files in java, create zip or compress files using ZipOutputStream class . Java framework has provided couple of