Friends! I recently appeared for OCA exam and scored 95%. Here i am sharing few techniques and exam question patterns which must be helping you while appearing for OCA test. This exam guarantee to ask question on the below topics or we can say statements.Exam code: 1Z0-8081. Must...
Wednesday, September 29, 2021
Monday, September 27, 2021
Java – Lambda Expressions Parameters
Lambda Expressions are anonymous functions. These functions do not need a name or a class to be used. Lambda expressions are added in Java 8. Lambda expressions basically express instances of functional interfaces An interface with a single abstract method is called a functional interface.Lambda expressions implement only...
Friday, September 24, 2021
How to Use Regular Expression as a Substitute of endsWith() Method in Java?
So primarily discuss what is endsWith() method is, so it is a method of String class that checks whether the string ends with a specified suffix. This method returns a boolean value true or false.Syntax:public boolean endsWith(String suff) Parameter: specified suffix part Return: Boolean value, here in java...
Wednesday, September 22, 2021
7 Best Games Written in Java
Among one of the most popular and well-known programming languages of the 21st century, Java is a household name.Created in 1995, the programming language prides itself on the mantra write once, run anywhere (WORA), making it incredibly useful in a world awash with different devices each running on...
Monday, September 20, 2021
Differences between Interface and Class in Java
This article highlights the differences between a class and an interface in Java.Class:A class is a user-defined blueprint or prototype from which objects are created. It represents the set of properties or methods that are common to all objects of one type. In general, class declarations can include...
Friday, September 17, 2021
Java Program to Implement Binomial Heap
A Binomial Heap is a set of Binomial Trees where each Binomial Tree follows Min Heap property. And there can be at most one Binomial Tree of any degree. It is explained to depth in the bellow illustration as follows:Illustration:There are 2 binomial heaps been depicted below out...
Wednesday, September 15, 2021
Convert Stream to Set in Java
Below given are some methods which can be used to convert Stream to Set in Java.Method 1: Using CollectorsStream collect() method takes elements from a stream and stores them in a collection.collect(Collector.toSet()) collects elements from a stream to a Set.Read More: 1Z0-808: Java SE 8 Programmer IStream.collect() method can...
Monday, September 13, 2021
Convert String or String Array to HashMap In Java
Considering a string object that contains the student name and roll number separated by a comma, and each student contains the name and roll number separated by a colon. Now need is to convert the String to a Map object so that each student roll number becomes the...
Friday, September 10, 2021
Why Constructors are not inherited in Java?
Constructor is a block of code that allows you to create an object of class and has same name as class with no explicit return type.Whenever a class (child class) extends another class (parent class), the sub class inherits state and behavior in the form of variables and...
Wednesday, September 8, 2021
Getter and Setter in Java
Getter and Setter are methods used to protect your data and make your code more secure. Getter returns the value (accessors), it returns the value of data type int, String, double, float, etc. For the convenience of the program, getter starts with the word “get” followed by the...