
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
2K+ Views
The BufferedWriter class of Java is used to write stream of characters to the specified destination (character-output stream). It initially stores all the characters in a buffer and pushes the contents of the buffer to the destination, making the writing of characters, arrays and Strings efficient.You can specify the required ... Read More

Maruthi Krishna
363 Views
Java provides various datatypes to store various data values. It provides 7 primitive datatypes (stores single values) namely, boolean, byte, char, short, int, long, float, double.Java strictly specifies range and behaviors of all the primitive datatypes. Making the users choose the required datatypes based on the application thus reducing the ... Read More

Maruthi Krishna
508 Views
When you create instance variables in Java you need to initialize them, else the compiler will initialize on your behalf with default values which are −byte: 0short: 0int: 0long: 0float: 0.0double: 0.0boolean: falsestring: nullExampleIn the following Java program prints the default values of the numeric and non-numeric primitive variables in ... Read More

Maruthi Krishna
6K+ Views
Whenever you inherit/extend a class, a copy of superclass’s members is created in the subclass object and thus, using the subclass object you can access the members of both classes.ExampleIn the following example we have a class named SuperClass with a method with name demo(). We are extending this class ... Read More

Maruthi Krishna
685 Views
A method which does not have body is known as abstract method. It contains only method signature with a semi colon and, an abstract keyword before it.public abstract myMethod();To use an abstract method, you need to inherit it by extending its class and provide implementation (body) to it. If a ... Read More

Maruthi Krishna
3K+ Views
The default methods are introduced in an interface since Java8. Unlike other abstract methods these are the methods can have a default implementation. If you have default method in an interface, it is not mandatory to override (provide body) it in the classes that are already implementing this interface.In short, ... Read More

Maruthi Krishna
1K+ Views
The "this" keyword in Java is a reference to the object of the current class. Using it, you can refer a field, method or, constructor of a class.Referring to a field using "this" keywordAs discussed you can refer an instance filed/variable of a class from an instance method or, a ... Read More

Maruthi Krishna
3K+ Views
The "this" keyword in Java is used as a reference to the current object, within an instance method or a constructor. Yes, you can call methods using it. But, you should call them only from instance methods (non-static).ExampleIn the following example, the Student class has a private variable name, with ... Read More

Maruthi Krishna
1K+ Views
A static method or, block belongs to the class and these will be loaded into the memory along with the class. You can invoke static methods without creating an object. (using the class name as reference).Whereas "this" in Java acts as a reference to the current object. But static contexts(methods and ... Read More

Maruthi Krishna
2K+ Views
A static block is a block of code with a static keyword. In general, these are used to initialize the static members. JVM executes static blocks before the main method at the time of class loading.Example Live Demopublic class MyClass { static{ System.out.println("Hello this is a static ... Read More