
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
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
Maruthi Krishna has Published 870 Articles

Maruthi Krishna
8K+ Views
Following Java program accepts a String value from the user, verifies whether a file contains the given String and prints the number of occurrences of the word too.Example Live Demoimport java.io.FileInputStream; import java.io.FileNotFoundException; import java.util.Scanner; public class FindingWordFromFile { public static void main(String args[]) throws FileNotFoundException { ... Read More

Maruthi Krishna
405 Views
The readUTF() method of the java.io.DataOutputStream reads data that is in modified UTF-8 encoding, into a String and returns it.ExampleThe following Java program reads a UTF-8 text from a .txt file using the readUTF() method.import java.io.DataInputStream; import java.io.EOFException; import java.io.FileInputStream; import java.io.IOException; public class UTF8Example { public static void ... Read More

Maruthi Krishna
4K+ Views
In general, data is stored in a computer in the form of bits (1 or, 0). There are various coding schemes available specifying the set of bytes represented by each character.Unicode (UTF) − Stands for Unicode Translation Format. It is developed by The Unicode Consortium. if you want to create ... Read More

Maruthi Krishna
4K+ Views
In general, data is stored in a computer in the form of bits (1 or, 0). There are various coding schemes available specifying the set of bytes represented by each character.Unicode (UTF) − Stands for Unicode Translation Format. It is developed by The Unicode Consortium. if you want to create ... Read More

Maruthi Krishna
353 Views
You can verify whether a particular file exists in the system in two ways using the File class and using the Files class.Using The File classThe class named File of the java.io package represents a file or directory (path names) in the system. This class provides various methods to perform ... Read More

Maruthi Krishna
19K+ Views
The BufferedReader class of Java is used to read the stream of characters from the specified source (character-input stream). The constructor of this class accepts an InputStream object as a parameter.This class provides a method known as readLine() which reads and returns the next line from the source and returns ... Read More

Maruthi Krishna
6K+ Views
When you declare the instance variables of a class private, you cannot access them in another class if you try to do so a compile-time error will be generated.But, if you inherit a class that has private fields, including all other members of the class the private variables are also ... Read More

Maruthi Krishna
3K+ Views
When we have two classes where one extends another and if, these two classes have the same method including parameters and return type (say, sample) the method in the subclass overrides the method in the superclass.i.e. Since it is an inheritance. If we instantiate the subclass a copy of superclass’s ... Read More

Maruthi Krishna
6K+ Views
Converting one data type to others in Java is known as casting.If you convert a higher datatype to lower datatype, it is known as narrowing (assigning higher data type value to the lower data type variable).char ch = (char)5;If you convert a lower data type to a higher data type, ... Read More

Maruthi Krishna
2K+ Views
The clone() method belongs to the class named Object of the java.lang package, it accepts an object as a parameter creates and returns a copy of it.In order to use this method, you need to make sure that your class implements the Cloneable (marker) interface.Example Live Demopublic class CloneExample implements Cloneable ... Read More