Nitya Raut has Published 220 Articles

How to call an existing function in a database using JDBC API?

Nitya Raut

Nitya Raut

Updated on 30-Jul-2019 22:30:25

7K+ Views

You can call a function using CallableStatement object just like stored procedures, to call a function using a JDBC program you need to.Connect to the database.Create a PreparedStatement object and to its constructor pass the function call in String format.Set values to the place holders.Execute the Callable statement.Following is the ... Read More

How to use size() in android PriorityBlockingQueue?

Nitya Raut

Nitya Raut

Updated on 30-Jul-2019 22:30:25

121 Views

Before getting into the example, we should know what PriorityBlockingQueue is. It is an unbounded queue and follows the same order as a priority queue. The main usage of priority blocking queue is, it going to handle out of memory error.This example demonstrates about How to use size() in android ... Read More

How to get current Wi-Fi mac address in android?

Nitya Raut

Nitya Raut

Updated on 30-Jul-2019 22:30:25

2K+ Views

This example demonstrate about How to get current Wi-Fi mac address in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. ... Read More

Best replacement of onItemClickListner in android recyclerview?

Nitya Raut

Nitya Raut

Updated on 30-Jul-2019 22:30:25

151 Views

This example demonstrates about Best replacement of onItemClickListner in android recyclerviewStep 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.           ... Read More

How to get information about USB mounted or not in android?

Nitya Raut

Nitya Raut

Updated on 30-Jul-2019 22:30:25

611 Views

This example demonstrate about How to get information about USB mounted or not in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. ... Read More

How to set fit webview screen in android?

Nitya Raut

Nitya Raut

Updated on 30-Jul-2019 22:30:25

3K+ Views

This example demonstrate about How to set fit webview screen in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. ... Read More

How to convert a timestamp object in to Date in JDBC program?

Nitya Raut

Nitya Raut

Updated on 30-Jul-2019 22:30:25

640 Views

The getTime() method of the Timestamp class retrieves and returns the time from the current timestamp in milliseconds (long) from epoch time 1, 1970 00:00:00.000 GMT.Timestamp timestamp = rs.getTimestamp("DispatTimestamp"); long time = timestamp.getTime();The constructor of the java.sql.Date class accepts a long variable representing the time in milliseconds from the epoch ... Read More

How to convert a Date object in to Timestamp in JDBC program?

Nitya Raut

Nitya Raut

Updated on 30-Jul-2019 22:30:25

725 Views

The getTime() method of the java.sql.Date class retrieves and returns the time from the current timestamp in milliseconds (long) from epoch time 1, 1970 00:00:00.000 GMT.//Retrieving the date Date date = rs.getDate("Dispatch_Date");The constructor of the java.sql.Timestamp class accepts a long variable representing the time in milliseconds from the epoch time ... Read More

How to run continues thread in android?

Nitya Raut

Nitya Raut

Updated on 30-Jul-2019 22:30:25

603 Views

Before getting into an example, we should know what thread in android is. Threads are generic processing tasks that can do most things, but one thing they cannot do is update the UI.This example demonstrates about How to run continues thread in android.Step 1 − Create a new project in ... Read More

How to share intent from intentservice in android?

Nitya Raut

Nitya Raut

Updated on 30-Jul-2019 22:30:25

420 Views

Before getting into example, we should know what Intent service is in android. Intent Service is going to do back ground operation asynchronously. When user call startService() from activity , it doesn’t create instance for each request. It going to stop service after done some action in service class or ... Read More

Advertisements