- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 4336 Articles for Java 8
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
862 Views
In android, using vibrate service, we can vibrate android mobile. This example demonstrate about how to make an Android device vibrateStep 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. In the above code, we have taken textview, when you click on textview. it will vibrate.Step 3 − Add the following code to src/MainActivity.javapackage com.example.andy.myapplication; import android.content.Context; import android.content.Intent; import android.os.Build; import android.os.Bundle; import android.os.VibrationEffect; import android.os.Vibrator; import android.support.v7.app.AppCompatActivity; import android.view.View; import ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
6K+ Views
In android, we can lunch other applications using packing name. This example demonstrate about How to Launch an application from another application on 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. In the above code, we have created one textview. When you click on textview, it will open YouTube.Step 3 − Add the following code to src/MainActivity.javapackage com.example.andy.myapplication; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.LinearLayout; import android.widget.TextView; import ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
4K+ Views
If you wants to go back from one activity to another activity, This example demonstrate about how to go back to previous activity 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. In the above code, we have given text view, when the user click on text view, it will open new activity.Step 3 − Add the following code to src/MainActivity.javapackage com.example.andy.myapplication; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import ... Read More
![Nancy Den](https://www.tutorialspoint.com/assets/profiles/13557/profile/60_88439-1512714529.jpg)
518 Views
There are key differences in Exception Handling in C++ vs JavaException handling in javaException handling in C++Only throwable objects can be thrown as objects.All types can be thrown as exceptionIn java, finally is a block that is executed after try catch block for cleaning up.In C++ there is no existence of finally blockA new keyword throws is used to list exceptions thrown by a function.Throw keyword is used to list exceptions thrown by a function.Both checked and unchecked exceptions are present.Only unchecked exceptions are present.
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
489 Views
The CachedRowSet is the base implementation of disconnected row sets. It connects to the data source, reads data from it, disconnects with the data source and the processes the retrieved data, reconnects to the data source and writes the modifications.You can create a Cached RowSet object using the createCachedRowSet() method of the RowSetFactory.You can create a RowSetFactory object using the newfactory() method of the RowSetProvider method.Updating a Particular column of a rowThe updateXXX() methods of the CachedRowSet interface allows you to update column values of a particular row in a RowSet object.Get the required row and update the desired column ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
504 Views
The CachedRowSet is the base implementation of disconnected row sets. It connects to the data source, reads data from it, disconnects with the data source and the processes the retrieved data, reconnects to the data source and writes the modifications.Creating a CachedRowSetYou can create a Cached RowSet object using the createCachedRowSet() method of the RowSetFactory.You can create a RowSetFactory object using the newfactory() method of the RowSetProvider method.Create a CachedRowSet object using the above mentioned methods as shown below −//Creating the RowSet object RowSetFactory factory = RowSetProvider.newFactory(); CachedRowSet rowSet = factory.createCachedRowSet();Connecting to the data sourceAfter creating a RowSet object you ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
2K+ Views
The CachedRowSet is the base implementation of disconnected row sets. It connects to the data source, reads data from it, disconnects with the data source and the processes the retrieved data, reconnects to the data source and writes the modifications.Creating a CachedRowSetYou can create a Cached RowSet object using the createCachedRowSet() method of the RowSetFactory.You can create a RowSetFactory object using the newfactory() method of the RowSetProvider method.Create a CachedRowSet object using the above-mentioned methods as shown below −//Creating the RowSet object RowSetFactory factory = RowSetProvider.newFactory(); CachedRowSet rowSet = factory.createCachedRowSet();Connecting to the data sourceAfter creating a RowSet object you need ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
357 Views
A RowSet object is similar to ResultSet, it also stores tabular data, in addition to the features of a ResultSet. A RowSet follows the JavaBeans component model.If you Retrieve a ResultSet object by default the cursor of it moves only in forward direction. i.e. you can retrieve the contents of it from first to last.But, in a scrollable result set, the cursor can scroll forward and backward and you can retrieve data backward too.To make ResultSet object scrollable, you need to create one as shown below −Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);Whereas, a RowSet object is Scrollable by default. Therefore, whenever ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
1K+ Views
A RowSet object is similar to ResultSet, it also stores tabular data, in addition to the features of a ResultSet a RowSet follows JavaBeans component model. This can be used as a JavaBeans component in a visual Bean development environment, i.e. in environments like IDE’s you can visually manipulate these properties.Connecting RowSet with databaseThe RowSet interface provides methods to set Java bean properties to connect it to the required database −void setURL(String url):void setUserName(String user_name):void setPassword(String password):PropertiesA RowSet object contains properties and each property have Setter and getter methods. Using these you can set and get values from a command ... Read More
![Nishtha Thakur](https://www.tutorialspoint.com/assets/profiles/13598/profile/60_104893-1512719058.jpg)
126 Views
In C++ methods are non-virtual by default. They can be made virtual function by using a virtual keyword.Example Code#include using namespace std; class B { public: void s() //non virtual by default. Use virtual before the function to print “In Derived” { cout