
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
AmitDiwan has Published 10744 Articles

AmitDiwan
1K+ Views
There are many features that can be seen in C++ but not in Java. A few of them have been listed below −No unsigned int option in JavaNo destructor in Java as well as ‘delete’ since garbage collector performs this operation for it.No friend classes or friend functions in Java.There ... Read More

AmitDiwan
281 Views
Soft references are often used to implement memory-sensitive caches. Let us see an example of soft references in Java −Example Live Demoimport java.lang.ref.SoftReference; class Demo{ public void display_msg(){ System.out.println("Hello there"); } } public class Demo_example{ public static void main(String[] args){ Demo ... Read More

AmitDiwan
130 Views
Following is an example, wherein we will see unreachable statement using the non-final variable −Exampleclass Demo_example { int a = 2, b = 3; void display_msg(){ while (a < b){ System.out.println("The first variable is greater than the second"); ... Read More

AmitDiwan
200 Views
Unreachable statements are those that don’t get executed when the code is being executed. This could be so because −There is a return statement before the code.There is an infinite loop in the code.The execution of the code is terminated forcibly before it executes.Here, we will see how the unreachable ... Read More

AmitDiwan
837 Views
There are four different kinds of references based on the way in which the data is garbage collected.Strong referencesWeak referencesSoft referencesPhantom referencesStrong referenceIt is the default type of reference object. An object that has active strong reference can’t be garbage collected. It is possible only if the variable that is ... Read More

AmitDiwan
170 Views
To support generic programming, as well as perform a stricter type check, Java implements type erasure.All type parameters in generic types are replaced with the bound (if unbounded) or object type. This way, the bytecode will only contain classes, methods, and interfaces.Type casts to preserve the type.Bridge methods are generated ... Read More

AmitDiwan
297 Views
To shuffle a list in Java, the code is as follows −Example Live Demoimport java.util.*; public class Demo{ public static void main(String[] args){ ArrayList my_list = new ArrayList(); my_list.add("Hello"); my_list.add(", "); my_list.add("this"); my_list.add("is"); ... Read More

AmitDiwan
3K+ Views
The MAX_VALUE is used to find the maximum possible value for an integer in Java. Let us see an example −Example Live Demopublic class Demo{ public static void main(String[] args){ System.out.println("The type is"); System.out.println(Integer.TYPE); System.out.println("The size is"); System.out.println(Integer.SIZE); ... Read More

AmitDiwan
238 Views
For longest Palindromic subsequence, the Java code is as follows −Example Live Demopublic class Demo{ static String longest_seq(String str_1, String str_2){ int str_1_len = str_1.length(); int str_2_len = str_2.length(); char str_1_arr[] = str_1.toCharArray(); char str_2_arr[] = str_2.toCharArray(); ... Read More

AmitDiwan
256 Views
Following is the code for adding properties and methods to an existing object in JavaScript −Example Live Demo Document body { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; } .result { font-size: 20px; font-weight: ... Read More