- 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
Samual Sam has Published 2492 Articles
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
971 Views
Ideally No. But, using the tricky code, a subclass can override a private method as well. See the example below −ExampleLive Democlass A { private void display() { System.out.println("A.display"); } public void callDisplay() { System.out.println("A.callDisplay"); display(); ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
8K+ Views
Byte StreamsJava byte streams are used to perform input and output of 8-bit bytes. Though there are many classes related to byte streams but the most frequently used classes are, FileInputStream and FileOutputStream. Following is an example which makes use of these two classes to copy an input file into ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
124 Views
The java.io.File class provides useful methods on file. This example shows how to check a file hidden or not by using the file.isHidden() method of File class.Exampleimport java.io.File; public class Main { public static void main(String[] args) { File file = new File("C:/java.txt"); ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
5K+ Views
Internet connectivity can be checked using java.net.URL and java.net.URLConnection class. Following are the required steps.Create a URL object and pass it the URL say GoogleCall URL.openConnection() method to get a URLConnection object.Call URLConnection.connect() method to check the internet connectivity. connect() method opens a communications link to the resource referenced by ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
2K+ Views
PointersIn C, C++ programming languages, a pointer is a variable that holds the address of another variable.example#include using namespace std; int main() { //int variable int i = 8; //pointer variable int * pI; //assign the address of i to its pointer pI = &i; //print the number cout
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
3K+ Views
In the case of Event-driven programming, we pass a reference to a function which will get called when an event occurs. This mechanism is termed as a callback. Java does not support function pointers. So we can not implement the same direction. But using interfaces we can achieve the same ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
618 Views
automatic resource management or try-with-resources is a new exception handling mechanism that was introduced in Java 7, which automatically closes the resources used within the try-catch block.ResourceA resource is an object which is required to be closed once our program finishes. For example, a file is read, database connection and ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
384 Views
With Java 8, Arrays class has a stream() methods to generate a Stream using the passed array as its source.DescriptionThe java.util.Arrays.stream() method returns a sequential Stream with the specified array as its source. −Arrays.stream(array)DeclarationFollowing is the declaration for java.util.Arrays.stream() methodpublic static Stream stream(T[] array)Type ParameterT − This is the type ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
7K+ Views
AssociationAssociation refers to the relationship between multiple objects. It refers to how objects are related to each other and how they are using each other's functionality. Composition and aggregation are two types of association.CompositionThe composition is the strong type of association. An association is said to composition if an Object ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
313 Views
No, You can't modify a range once it is created. Instead what you can do is use a while loop instead. For example, if you have some code like:for i in range(lower_limit, higher_limit, step_size):# some code if i == 10: higher_limit = higher_limit + 5You can change it to:i ... Read More