×
Home
Jobs
Tools
Coding Ground
Current Affairs
UPSC Notes
Online Tutors
Whiteboard
Net Meeting
Tutorix
Login
Packages
Categories
Java
JSP
iOS
HTML
Android
Python
C Programming
C++ Programming
C#
PHP
CSS
Javascript
jQuery
SAP
SAP HANA
Data Structure
RDBMS
MySQL
Mathematics
8085 Microprocessor
Operating System
Digital Electronics
Analysis of Algorithms
Mobile Development
Front End
Web Development
Selenium
MongoDB
Computer Network
General Topics
Library
Videos
Q/A
eBooks
Login
Library
Videos
eBooks
Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Selected Reading
UPSC IAS Exams Notes
Developer's Best Practices
Questions and Answers
Effective Resume Writing
HR Interview Questions
Computer Glossary
Who is Who
Lakshmi Srinivas
has Published
366
Answers
What are the ways in which a thread is created in Java?
Java 8
Object Oriented Programming
Programming
Lakshmi Srinivas
Published on 04-Jan-2018 17:36:56
There are two ways to create a new thread of execution.By Implementing a Runnable InterfaceOne way to create a thread is by implementing the Runnable interface to do so −Create a class and implement the Runnable interface.Override the run() method of the Runnable interface.Instantiate the Thread class by passing the object ...
Read More
How to use file class in Java?
Java 8
Object Oriented Programming
Programming
Lakshmi Srinivas
Published on 04-Jan-2018 15:44:02
Java File class represents the files and directory pathnames in an abstract manner. This category is employed for the creation of files and directories, file looking out, file deletion, etc. The File object represents the particular file/directory on the disk.ExampleLive Demoimport java.io.File; public class FileDemo { public static ...
Read More
How to check the Date and time of Access (last modified) of a File using Java?
Java 8
Object Oriented Programming
Programming
Lakshmi Srinivas
Published on 04-Jan-2018 15:20:05
You can get the last modified date of a file using the lastModified() method of the File class.ExampleLive Demoimport java.io.File; import java.util.Date; public class FindingDirectories { public static void main(String args[]) { String dir ="C:/movies"; File directory = new File(dir); ...
Read More
What is Externalizable in Java?
Java 8
Object Oriented Programming
Programming
Lakshmi Srinivas
Published on 04-Jan-2018 15:00:52
Externalization is used whenever we need to customize serialization mechanism. If a class implements an Externalizable interface then, object serialization will be done using writeExternal() method.Whereas at receiver’s end when an Externalizable object is a reconstructed instance will be created using no argument constructor and then the readExternal() method is ...
Read More
What is exception propagation in Java?
Java 8
Object Oriented Programming
Programming
Lakshmi Srinivas
Published on 04-Jan-2018 12:59:45
If an exception occurs in the protected code, the exception is thrown to the first catch block in the list. If the data type of the exception thrown matches ExceptionType1, it gets caught there. If not, the exception passes down to the second catch statement. This continues until the exception ...
Read More
Is there a case when finally block does not execute in Java?
Java 8
Object Oriented Programming
Programming
Lakshmi Srinivas
Published on 04-Jan-2018 12:35:26
The finally block follows an attempt block or a catch block. A finally block of code invariably executes, irrespective of incidence of an Exception.
What is null pointer exception in Java and how to fix it?
Java 8
Object Oriented Programming
Programming
Lakshmi Srinivas
Published on 04-Jan-2018 12:17:39
A null pointer exception is thrown Whenever you try toCall the instance method of a null object.Access, modify, print, a null value.Trying to access (print/use in statements) the length of the null value.Throw a null value.Access an element of an array without initializing it.Then, a Null Pointer Exception will be ...
Read More
How to sort a String array in Java?
Java 8
Object Oriented Programming
Programming
Lakshmi Srinivas
Published on 03-Jan-2018 16:41:07
To sort a String array in Java, you need to compare each element of the array to all the remaining elements, if the result is greater than 0, swap them.One solution to do so you need to use two loops (nested) where the inner loop starts with i+1 (where i ...
Read More
How I can reverse a Java Array?
Java 8
Object Oriented Programming
Programming
Lakshmi Srinivas
Published on 03-Jan-2018 15:12:26
To reverse an array, swap the first element with the last element and the second element with second last element and so on if the array is of odd length leave the middle element as it is.In short swap the 1st element with the 1st element from last, second element ...
Read More
How do we compare two arrays in Java?
Java 8
Object Oriented Programming
Programming
Lakshmi Srinivas
Published on 03-Jan-2018 14:42:38
You can compare two arrays in Java using the compare() method of the Arrays class.ExampleLive Demoimport java.util.Arrays; public class ComparingArrays { public static void main(String args[]) { String[] myArray1 = {"JavaFX", "HBase", "OpenCV", "WebGL", "FlexBox"}; String[] myArray2 = {"JavaFX", "HBase", "OpenCV", "WebGL", "FlexBox"}; ...
Read More
Previous
1
...
31
32
33
34
35
36
37
Next
Advertisements
Print
Add Notes
Bookmark this page
Report Error
Suggestions
Save
Close
Dashboard
Logout