Home » Java » Core Java » Page 3

Core Java

Adding Partition To Existing Table In Oracle

Learn How To Add Partition To Existing Table In Oracle. New changes to partition in Oracle 12c. partitioned table using the ALTER TABLE … MODIFY command in 3 ways. 1) Basic offline operation 2) Online operation 3) Online operation with modification of index partitioning How do I alter my existing table to create a range partition in Oracle Creating partition ...

Read More »

Adding Range Type in Java

1. Introduction Modern and more recent programming languages have the concept of a range type. Programming languages such as Python, Ada, Ruby, and Rust, each have the concept of a range-a bounded beginning and end of a numerical sequence or series of integers. The Java programming language has a reputation for being a verbose, wordy programming language [Pras 2012] by ...

Read More »

Java String API regionMatches​()

Quick guide to Java String API regionMatches​() Method with Examples. This method is used to compare two sub strings. Syntax: public boolean regionMatches​(int toffset, String other, int ooffset, int len) 1. Java String regionMatches​() Overview In this tutorial, We’ll learn about Java String API regionMatches​() method to compare two substrings. In other words, comparing regions of two strings. This method ...

Read More »

Java 8 Optional filter()

A quick example guide to Java 8 Optional filter() Method. filter(Predicate predicate) method used to return a Optional object for the given predicate(the condition). 1. Overview In this tutorial, We’ll discuss how to use Predicate with Optional class. TheJava 8 Optional class has a method filter() which takes  Predicate as an argument. Optional is a class and it is in  java.util ...

Read More »

How to change procedural code into object-oriented one?

What style should Clean Code be written in? Clean Code is not always object-oriented. Sometimes it will be written in procedural style. And what style is better: procedural or object-oriented? We should perform the choice under given conditions which facilitates its development and readability – in accordance with the principles of Clean Code. Below is an example of the procedural ...

Read More »

Java Compress/Decompress String/Data

Java provides the Deflater class for general purpose compression using the ZLIB compression library. It also provides the DeflaterOutputStream which uses the Deflater class to filter a stream of data by compressing (deflating) it and then writing the compressed data to another output stream. There are equivalent Inflater and InflaterOutputStream classes to handle the decompression. Compression Here is an example ...

Read More »

Optional ofNullable() method (With Examples)

A quick guide to Optional ofNullable() method in Java 8 API with Example programs. How to use in the real time projects. 1. Introduction In this tutorial, We’ll learn Optional ofNullable() example on how to create new Java 8 Optional object for any value or null value. Optional is part of  java.util package. API Note: Returns an Optional describing the given value, if ...

Read More »