Java String In Java, string is an object of sequence of char values like an array of characters. There are two ways to create String object: String literal and new keyword 1) String Literal Java String literal is created by using double quotes. For Example: char[]...
Part 24: List of Java Keywords with real Example
Java Keywords Java keywords are also known as reserved words. They are particular words that acts as a key to a code. These are predefined words by Java so it cannot be used as a variable or object name. Let's know the list of Java Keywords. A list of Java keywords or...
Part 23: File Handling keyword Create Read Delete in java
File handling create a File To create a file in Java, the createNewFile() method is used. This method returns a boolean value true if the file was successfully created, and false if the file already exists. The method is enclosed in a try...catch block. This is...
Part 22: Java Lambda Expressions with real time Example
Java Lambda Expressions Lambda Expressions in java were added in Java 8. When you implemented an anonymous simple class, such as an interface which contains only one method, then the syntax of anonymous classes may seem vogue and unclear. In these scenario, trying to...
Part 21: Threads in java with properties and real time example
Java Threads Threads in javapermits a program to operate more creatively at the same time multiple things. It can be used to perform complex tasks in the background without disturbing the main program. How to create a thread: There are two ways to create a thread,...
Part 20: Exceptions in Java with real time Example.
Java Exceptions An exception or exceptional event is a problem. This is getting up during the execution of a program. When an Exception happens the normal flow of the program is disrupted and the program terminates unusually. This is not recommended, consequently,...
Part 19: Wrapper class with autoboxing and unboxing in Java
Wrapper classes in Java The wrapper class in Java offers the mechanism to translate primitive into object and object into primitive. This feature has obtained from Java J2SE 5.0, autoboxing and unboxing. Actually, these feature convert primitives into objects and...
Part 18: Iterator in java with real Time example
Iterator in java Iterator in java allows to cycle through a collection can be added or removing elements. To access a collection over an iterator, must attain one. Each of the collection classes offers an iterator () method that returns an iterator to the start of the...
Part 17: HashSet in Java with real time example
Java HashSet In a HashSet, every item is unique which is known as collection. It is found in the java.util packages. This collection uses a hash table for storage. It inherits the AbstractSet class and implements Set interface. A list can contain duplicate elements...
Part 16: LinkedList in Java with real time examples
LinkedList in Java Linked List is almost similar ArrayList features. It is a part of the collection framework present in java.util package. The class is an implementation of the linear LinkedList data structure. Here the elements are not stored in adjoining locations...
Part 15: Java ArrayList with real time example
Java ArrayList The ArrayList class is a resizable array in the java.util package. There is a difference between a built-in array and an ArrayList in Java. The size of an array cannot be modified to add or remove elements to/from an array to create a new one. While...
Part 14: Date and Time in Java with real time Example.
Date and Time in Java Example of Constructor Date( ) this constructor initializes the object with the current date and time. Date(long millisec) this constructor accepts an argument that equals the number of milliseconds that have elapsed since midnight, January 1,...
Part 13: User input in java with real time example code
Java User Input The Scanner class is used to get user input and is the easiest way to read input in Java program. Java Scanner class permits the user to take input from the console. The class is belongs to java.util package. It is used to read the input of primitive...
Part 8: Java Polymorphism with its real time example code.
Java Polymorphism Polymorphism means "many forms", It is useful for code reusability: reuse attributes and methods of an existing class when you create a new class. It occurs when we have many classes that are related to each other by inheritance. Like we definite in...
Part 7: Java Inheritance with real time example
Part 12: Enums in java with uses example code.
Enums in java An enum is a group of constants. To create an enum, use the enum keyword instead of class or interface. Also separate the constants with a comma. It is use when you have values that you know aren't going to change such as month days, days, colors, deck...
Java 6: Java Packages and API in programming
Java Packages & API In Java, a package is group related classes or a folder in a path (file directory). Generally, packages are used to avoid name conflicts and to write a better supportable code. Packages are divided into two categories: User-defined Packages...
Part 4: Java Scope and Recursion use with Example.
Java Scope and Recursion use Java Scope In Java, variables are only accessible inside the region they are created. This is called scope.In Method Scope Variables declared directly inside a method. Example public class Tree{ public static void main(String[] args) { //...
Part 1: Java OOP and its feature with example
What is Java OOP? OOP stands for Object-Oriented Programming where java is a procedural programming. It is about writing procedures or methods to perform operations on the data. OOP is concerns creating objects that contain both data and methods. Draftsbook goals For...
Part 26: What is the defference among String, StringBuffer and StringBuilder.
String VS StringBuffer VS StringBuilder String is immutable that is if you want to change a string value another object gets created. On the other hand StringBuffer and StringBuilder are mutable they can change their values. More about String : Generally, an object...
Laravel – Scopes (3 Easy Steps)
Scoping is one of the superpowers that eloquent grants to developers when querying a model. Scopes allow developers to add constraints to queries for a given model. In simple terms laravel scope is just a query, a query to make the code shorter and faster. We can...
CAMBRIDGE IELTS 17 TEST 3
READING PASSAGE 1: The thylacine Q1. carnivorous keywords: Looked like a dog had series of stripes ate, diet ate an entirely 1 .......................................... diet (2nd paragraph 3rd and 4th line) 1st and 2nd paragraph, 1st paragraph,resemblance to a...
Cambridge IELTS 16 Test 4
Here we will discuss pros and cons of all the questions of the passage with step by step Solution included Tips and Strategies. Reading Passage 1 –Roman Tunnels IELTS Cambridge 16, Test 4, Academic Reading Module, Reading Passage 1 Questions 1-6. Label the diagrams...
Cambridge IELTS 16 Test 3
Reading Passage 1: Roman Shipbuilding and Navigation, Solution with Answer Key , Reading Passage 1: Roman Shipbuilding and Navigation IELTS Cambridge 16, Test 3, Academic Reading Module Cambridge IELTS 16, Test 3: Reading Passage 1 – Roman Shipbuilding and...