Category: Java
-
JavaInterface vs Abstract class
As we all know, abstraction refers to hiding the internal implementation of a feature and only giving the users the…
June 3, 2022
-
JavaNested Class in Java
It is possible to define a class within another class in Java, and these classes are referred to as nested…
June 11, 2022
-
JavaRegular class vs static nested class
Comparison between a normal or regular class and a static nested class. S.NO Normal/Regular inner class Static nested class 1….
June 11, 2022
-
JavaAbstract class vs Concrete class
Following are the important differences between an abstract class and a concrete class. Sr. No. Key Abstract Class Concrete Class…
June 11, 2022
-
JavaStrings in Java
Strings are Objects in Java that are internally backed by a char array. They are immutable because arrays are immutable…
June 11, 2022
-
JavaString class methods in Java
Many useful methods for performing operations on a sequence of char values are available in the java.lang.String class. No. Method…
June 11, 2022
-
JavaSome examples of string class methods
The methods listed below are some of the most frequently used String class methods in Java. charAt() method: The charAt()…
June 15, 2022
-
JavaJava StringBuffer class
StringBuffer is a String peer class that provides a lot of the same functionality as strings. StringBuffer represents growable and…
June 16, 2022
-
JavaStringBuilder class in Java
The Java class StringBuilder represents a mutable string of characters. The StringBuilder class offers a substitute for the String Class…
June 17, 2022
-
JavaStringTokenizer in Java
A string can be divided into tokens using Java’s StringTokenizer class. Internally, a StringTokenizer object keeps track of where it is in the string that has to be tokenized. Some procedures move this place ahead of the currently processed characters. By extracting a substring from the string that was used to generate the StringTokenizer object, a token is returned. It offers the initial stage of the parsing procedure, often known as the lexer or scanner. The String Tokenizer class enables applications to tokenize strings. The Enumeration interface is implemented by it. Data parsing is done using this class. We must specify an input string and a string with delimiters to use the String Tokenizer class The characters that divide tokens are known as delimiters. The delimiter string’s characters are all accepted as delimiters. Whitespaces, new…
June 18, 2022
-
JavaException Handling in Java
One of the efficient ways to deal with runtime failures in Java is through exception handling, which helps to maintain…
June 18, 2022
-
Javatry-catch block in Java
Java has two keywords for managing exceptions: try-catch block. Java try block : To contain code that might throw an…
June 22, 2022