- 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
Raja has Published 760 Articles
raja
163 Views
The substring() method returns a String datatype which corresponds to the original String starting from the begin index until the end Index. If the end index is not specified, it is imperative that the endIndex is the String length. Since we are dealing with the String, the index starts at '0' ... Read More
raja
4K+ Views
A typical structure of a Java program contains the following elementsPackage declarationImport statementsCommentsClass definitionClass variables, Local variablesMethods/BehaviorsPackage declarationA class in Java can be placed in different directories/packages based on the module they are used. For all the classes that belong to a single parent source directory, a path from source ... Read More
raja
2K+ Views
The NumberFormatException is an unchecked exception thrown by parseXXX() methods when they are unable to format (convert) a string into a number.The NumberFormatException can be thrown by many methods/constructors in the classes of java.lang package. Following are some of them.public static int parseInt(String s) throws NumberFormatExceptionpublic static Byte valueOf(String s) throws NumberFormatExceptionpublic static byte parseByte(String s) throws NumberFormatExceptionpublic ... Read More
raja
2K+ Views
No, we cannot write any statements in between try, catch and finally blocks and these blocks form one unit. The functionality of try keyword is to identify an exception object and catch that exception object and transfer the control along with the identified exception object to the catch block by suspending the execution ... Read More
raja
3K+ Views
A Type casting in Java is used to convert objects or variables of one type into another. When we are converting or assigning one data type to another they might not compatible. If it is suitable then it will do smoothly otherwise chances of data loss.Type Casting Types in JavaJava ... Read More
raja
9K+ Views
Immutable objects are those objects whose states cannot be changed once initialized. Sometimes it is necessary to make an immutable class as per the requirement. For example, All primitive wrapper classes (Integer, Byte, Long, Float, Double, Character, Boolean and Short) are immutable in Java. String class is also an immutable ... Read More
raja
14K+ Views
Tight coupling means classes and objects are dependent on one another. In general, tight coupling is usually not good because it reduces the flexibility and re-usability of the code while Loose coupling means reducing the dependencies of a class that uses the different class directly.Tight CouplingThe tightly coupled object is ... Read More
raja
11K+ Views
Every Java object has two very important methods equals() and hashCode() and these methods are designed to be overridden according to their specific general contract. An Object class is the parent class of every class, the default implementation of these two methods is already present in each class. However, we can ... Read More
raja
4K+ Views
Both String and Char[] array are used to store the textual data but choosing one over the other is more difficult. Maybe we can get the idea from the immutability of String why char[] array is preferred over String for storing sensitive information data like password, SSN, etc.Using the plain string is ... Read More
raja
4K+ Views
A block of statements to which the control can never reach under any case can be called as unreachable blocks. Unreachable blocks are not supported by Java. The catch block mentioned with the reference of Exception class should and must be always last catch block because Exception is the superclass of ... Read More
To Continue Learning Please Login
Login with Google