Java Tutorials for Freshers and Experience developers, Programming interview Questions, Data Structure and Algorithms interview Programs, Kotlin programs, String Programs, Java 8 Stream API, Spring Boot and Troubleshooting common issues.
الثلاثاء، 30 نوفمبر 2021
[Fixed] Another git process seems to be running in this repository git in 6 ways
[Fixed] Git error: failed to push some refs to in 5 ways
1. Overview
[Fixed] fatal: not a git repository (or any of the parent directories): .git in 2 ways
1. Overview
Java PrintWriter
1. Overview
public class PrintWriter extends Writer
الاثنين، 29 نوفمبر 2021
How To Enable HSTS Header? How to Implement custom HSTS Filter in Java with Examples?
1. Overview:
In this post, We'll learn how to enable/add HTTP Strict Transport Security (HSTS) Header to Tomcat 8 using a built-in filter. And also discuss how to add a custom HSTS filter in a java web application.Learn Enabling/Adding HTTP Strict Transport Security (HSTS) Header to a Website in Tomcat or Any Server
As well as a solution to add HSTS to any web-site using web.config.
At last, will talk about the testing methodology to make sure HSTS is enabled for a website.
About HSTS:
HTTP Strict Transport Security (HSTS) instructs web browsers to only use secure connections for all future requests when communicating with a website. Doing so helps prevent SSL protocol attacks, SSL stripping, cookie hijacking, and other attempts to circumvent SSL protection.
[Fixed] Git - remote: Repository not found in 9 ways (Windows and Mac)
1. Overview
2. Fix 1 - Git - remote: Repository not found
git remote set-url origin https://github.com/JavaProgramTo/Kotlin-Demo.git git add *.java git commit -m "commit title" git push origin master
3. Fix 2 - Git - remote: Repository not found
git remote -v origin https://github.com/JavaProgramTo/Kotlin-Demo.git (fetch) origin https://github.com/JavaProgramTo/Kotlin-Demo.git (push)
4. Fix 3 - Git - remote: Repository not found
$ git credential-manager uninstall
$ git credential-manager install
5. Fix 4 - Git - remote: Repository not found
- Go to the git folder and go inside the .git folder
- Open 'config' file using notepad or any other editor
- Change your URL from https://github.com/username/repo_name.git to https://username:password@github.com/username/repo_name.git
- Save and Push the code, it will work.
git clone https://username@github.com/org/repo.git
- username with your GitHub username
- org with your organisation name
- repo with the repository name
6. Fix 5 - Git - remote: Repository not found
git remote update
7. Fix 6, 7, 8, 9- Git - remote: Repository not found
git remote remove origin git remote add origin https://github.com/JavaProgramTo/Kotlin-Demo.git
8. Conclusion
Git Delete Local Branch and Remote Branch (With Force Delete)
1. Overview
How to create and initialize boolean array in java?
1. Overview
الأحد، 28 نوفمبر 2021
Java 8 Stream map() examples - Stream Conversions
1. Overview
In this article, we'll be learning about a new map() function in Java 8 that is introduced in Stream API. map() method converts a Stream from one form to another Stream. This takes input X type Stream and converts into Y type output Stream.
This is widely used as part of new JDK 8 api.
السبت، 27 نوفمبر 2021
Java Nested Arrays - Multidimensional Arrays Examples
1. Overview
Java Set to String
1. Overview
Java - Create and Iterate List of Lists With Examples
1. Overview
Nested lists with streams in Java 8 With flatMap() (list of lists)
1. Overview
الجمعة، 26 نوفمبر 2021
Java - Converting between List and Set (6 ways)
1. Overview
Java 8 Streams - Join or Append Stream of Strings using Collectors.joining()
1. Overview
2. Collectors.joining() Method
public static Collector<CharSequence,?,String> joining() public static Collector<CharSequence,?,String> joining(CharSequence delimiter) public static Collector<CharSequence,?,String> joining(CharSequence delimiter, CharSequence prefix, CharSequence suffix)
3. Java 8 Stream Join String Examples
package com.javaprogramto.java8.streams.join; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; /** * Java Join Stream Of Strings and stream to string examples. * * @author JavaProgramTo.com * */ public class StreamOfStringJoiningExample { public static void main(String[] args) { // Creating the List with string values using Arrays.asList() method List<String> stringsList = Arrays.asList("1", "2", "3", "4", "5"); // java 8 join stream of strings or stream to string // Example - 1: with default delimiter String joinWithDefaultDelimiter = stringsList.stream().collect(Collectors.joining()); // Example - 2: with delimiter String joinWithDelimiter = stringsList.stream().collect(Collectors.joining(":")); // Example - 3: with given delimiter, suffix and prefix String joinWithDelimiterSuffixPrefix = stringsList.stream().collect(Collectors.joining("|", "[", "]")); // printing the values System.out.println("Input List of strings : " + stringsList); System.out.println("joining() string : " + joinWithDefaultDelimiter); System.out.println("joining(delimiter) string : " + joinWithDelimiter); System.out.println("joining(delimiter, suffix, prefix) string : " + joinWithDelimiterSuffixPrefix); } }
Input List of strings : [1, 2, 3, 4, 5] joining() string : 12345 joining(delimiter) string : 1:2:3:4:5 joining(delimiter, suffix, prefix) string : [1|2|3|4|5]
4. Stream IllegalStateException: stream has already been operated upon or closed
// Creating the stream object once and reuse for every collect() call. Stream<String> stream = stringsList.stream(); // java 8 join stream of strings or stream to string // Example - 1: with default delimiter String joinWithDefaultDelimiter = stream.collect(Collectors.joining()); // Example - 2: with delimiter String joinWithDelimiter = stream.collect(Collectors.joining(":")); // Example - 3: with given delimiter pipe(|), suffix and prefix String joinWithDelimiterSuffixPrefix = stream.collect(Collectors.joining("|", "[", "]"));
Exception in thread "main" java.lang.IllegalStateException: stream has already been operated upon or closed at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:229) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578) at com.javaprogramto.java8.streams.join.StreamOfStringJoiningExample.main(StreamOfStringJoiningExample.java:29)
5. Conclusion
Java 8 - Convert IntStream to String
1. Overview
Java 8 - Convert IntStream to Array
1. Overview
Java 8 - Convert IntStream To List and Other
1. Overview
Java 8 Stream reduce
1. Overview
الخميس، 25 نوفمبر 2021
Java 8 – Convert LocalDateTime to Timestamp & Vice Versa
1. Overview
Java 8 Integer Class new methods
1. Overview
public static String toUnsignedString(int i, int radix) public static String toUnsignedString(int i) public static int parseUnsignedInt(String s, int radix) throws NumberFormatException public static int parseUnsignedInt(String s) throws NumberFormatException public static int hashCode(int value) public static int compareUnsigned(int x, int y) public static long toUnsignedLong(int x) public static int divideUnsigned(int dividend, int divisor) public static int remainderUnsigned(int dividend, int divisor) public static int sum(int a, int b) public static int max(int a, int b) public static int min(int a, int b)
الأربعاء، 24 نوفمبر 2021
Java Convert String To int - Parse Examples
1. Overview
2. String to Int: Using Integer.parseInt()
public class ParseIntExample { public static void main(String[] args) { // Creating a string String s = "12345"; // converting string to int using parseInt() method int i = Integer.parseInt(s); // printing the input and output System.out.println("string : "+s); System.out.println("integer : "+i); } }
string : 12345 integer : 12345
3. String to Int: Using Integer.valueOf()
public class ValueOfExample { // Example to string to int public static void main(String[] args) { // Creating String object with value "1000" String s2 = "1000"; // Calling valueOf() method which does string to int conversion Integer i2 = Integer.valueOf(s2); // printing values System.out.println("string value: "+s2); System.out.println("integer value: "+i2); } }
string value: 1000 integer value: 1000
4. String to Int: Using Integer Constructor with String Argument
public class IntegerConstructorExample { // string to int with integer constructor public static void main(String[] args) { // creating string object 3 String s3 = "999"; // convert string to integer with Interger constructor Integer i3 = new Integer(s3); // convert Wrapper integer to primitive int using primitive int int int3 = i3.intValue(); // printing the values System.out.println("String s3 value : " + int3); System.out.println("Integer int3 value : " + int3); } }
String s3 value : 999 Integer int3 value : 999
5. String to Int: Using DecimalFormat class
import java.text.DecimalFormat; import java.text.ParseException; public class DecimalFormatExample { // DecimalFormat.parse() example to parse string into int value. public static void main(String[] args) throws ParseException { // Creating a string object with value 123456 String string = "123456"; // Passing "0" to the DecimalFormat indicates that it shuould accepts only digits. DecimalFormat decimalFormat = new DecimalFormat("0"); // parsing String to Number Number number = decimalFormat.parse(string); // converting Number to primitive int. int i4 = number.intValue(); // printing values System.out.println("string value : " + string); System.out.println("i4 value : " + i4); } }
string value : 123456 i4 value : 123456
6. String To Int Exception Java
package com.javaprogramto.convert.string.toint; /** * Example to exception in string to integer conversion * * @author Javaprogramto.com * */ public class StringToIntException { public static void main(String[] args) { // creating string with alphabets String s = "hello world"; // convert string to int using parseInt() method. This will throw exception // int number = Integer.parseInt(s); // int number = Integer.valueOf(s); Integer number = new Integer(s); // printing vlaues System.out.println("Number : " + number); } }
Exception in thread "main" java.lang.NumberFormatException: For input string: "hello world" at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:68) at java.base/java.lang.Integer.parseInt(Integer.java:658) at java.base/java.lang.Integer.<init>(Integer.java:1117) at com.javaprogramto.convert.string.toint.StringToIntException.main(StringToIntException.java:19)
7. Conclusion
Stream to Array - How To Convert Stream To Array In Java 8?
1. Overview
In this article, we'll explore the different ways to convert Stream to Array in Java 8.
I have shown in the previous article how to convert ArrayList<String> to String[] array in java 8.
Java 8 Stream api provides a method Stream.toArray() method which converts the string to array in a faster way.
Stream.of(String t) method is used to create Stream of Strings as Stream<String>.
We will be showing the conversion on the following in this article
1.1 Using Method Reference
1.2 Lambda Expression
1.3 Custom class stream to custom class array
1.4 On primitive types
But, for all the cases, you must use the Stream.toArray() method.
Stream.toArray() Syntax:
<A> A[] toArray(IntFunction<A[]> generator);
Let us explore each of these topics. In this article, We are going to show examples of how to convert Stream of String into a String array. But, you can convert any Stream of objects into any typed array.
Below all are possible with the toArray() method.
Example 1: Convert Stream<String> to String[] array
Example 2: Convert Stream<Employee> to Employee[] array
Example 3: Convert Stream<CustomClass> to CustomClass[] array
Example 4: Convert Stream<Integer> to Integer[] wrapper Integer array
Example 5: Convert Stream<Integer> to int[] primitive array
2. Using Method Reference
Method Reference is a broad topic. You can go through this article for an advanced level.
Method ref is indicated with "::" double colon operator introduced in java 8 and used to create an instance for a class.
Let us write a simple method with Method reference.
public static String[] convertStreamToArray(Stream<String> stringStream){
String[] strArray = stringStream.toArray(String[]::new);
return strArray;
}
Next, write the code to test this method working fine or not.import java.util.Arrays;
import java.util.stream.Stream;
public class MethodRefStreamToArray {
public static void main(String[] args) {
Stream<String> stringStream = Stream.of("hello", "reader", "welcome", "to", "javaprogramto.com", "blog");
String[] array1 = convertStreamToArray(stringStream);
System.out.println("Array 1 : "+ Arrays.toString(array1));
Stream<String> stringStream2 = Stream.of("seocond", "example", "stream to array");
String[] array2 = convertStreamToArray(stringStream2);
System.out.println("Array 2 : "+ Arrays.toString(array2));
}
public static String[] convertStreamToArray(Stream<String> stringStream) {
String[] strArray = stringStream.toArray(String[]::new);
return strArray;
}
}
Output:Array 1 : [hello, reader, welcome, to, javaprogramto.com, blog] Array 2 : [seocond, example, stream to array]
3. Using Lambda Expression
import java.util.Arrays;
import java.util.stream.Stream;
public class LambdaStreamToArray {
public static void main(String[] args) {
Stream<String> stringStream = Stream.of("hello", "reader", "welcome", "to", "javaprogramto.com", "blog");
String[] array1 = convertStreamToArrayWithLambda(stringStream);
System.out.println("Array 1 : "+ Arrays.toString(array1));
Stream<String> stringStream2 = Stream.of("seocond", "example", "stream to array");
String[] array2 = convertStreamToArrayWithLambda(stringStream2);
System.out.println("Array 2 : "+ Arrays.toString(array2));
}
public static String[] convertStreamToArrayWithLambda(Stream<String> stringStream) {
String[] strArray = stringStream.toArray(size -> {
return new String[size];
});
return strArray;
}
}
This program produces the output as same as the above section.4. Using Custom Generator Class
import java.util.Arrays;
import java.util.function.IntFunction;
import java.util.stream.Stream;
public class CustomIntFunctionStreamToArray {
public static void main(String[] args) {
Stream<String> stringStream = Stream.of("hello", "reader", "welcome", "to", "javaprogramto.com", "blog");
String[] array1 = stringStream.toArray(new CustomIntFunction());
System.out.println("Array 1 : "+ Arrays.toString(array1));
Stream<String> stringStream2 = Stream.of("seocond", "example", "stream to array");
String[] array2 = stringStream2.toArray(new CustomIntFunction());;
System.out.println("Array 2 : "+ Arrays.toString(array2));
}
}
class CustomIntFunction implements IntFunction<String[]>{
@Override
public String[] apply(int size) {
return new String[size];
}
}
Output:Array 1 : [hello, reader, welcome, to, javaprogramto.com, blog]
Array 2 : [seocond, example, stream to array]
5. Stream to Primitive Or Wrapper Array conversion
Wrapper Stream to Wrapper[] Array Example
import java.util.Arrays; import java.util.stream.Stream; public class WrapperStreamToArray { public static void main(String[] args) { Stream<Integer> integerStream = Stream.of(1, 2, 3, 4, 5, 6, 7); Integer[] array1 = integerStream.toArray(Integer[]::new); System.out.println("Integer Array 1 : " + Arrays.toString(array1)); Stream<Integer> integerStream2 = Stream.of(11, 22, 33, 44, 55); Integer[] array2 = integerStream2.toArray(size -> new Integer[size]); System.out.println("Integer Array 2 : " + Arrays.toString(array2)); } }Output:
Integer Array 1 : [1, 2, 3, 4, 5, 6, 7] Integer Array 2 : [11, 22, 33, 44, 55]
Integer[] array2 = integerStream2.toArray(size -> new Integer[0]);
Exception:Exception in thread "main" java.lang.IllegalStateException: Begin size 5 is not equal to fixed size 0 at java.base/java.util.stream.Nodes$FixedNodeBuilder.begin(Nodes.java:1222) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:550) at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260) at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:517) at com.javaprogramto.java8.streams.toarray.WrapperStreamToArray.main(WrapperStreamToArray.java:18)
Wrapper Stream to int[] primitive Array Example
import java.util.Arrays; import java.util.stream.Stream; public class PrimitiveStreamToArray { public static void main(String[] args) { Stream<Integer> integerStream = Stream.of(1, 2, 3, 4, 5, 6, 7); int[] array1 = integerStream.mapToInt(primitiveVlaue -> primitiveVlaue).toArray(); System.out.println("int[] Array 1 : " + Arrays.toString(array1)); Stream<Integer> integerStream2 = Stream.of(11, 22, 33, 44, 55); int[] array2 = integerStream2.mapToInt( i -> i).toArray(); System.out.println("int[] Array 2 : " + Arrays.toString(array2)); } }
7. Exception
Array 1 : [hello, reader, welcome, to, javaprogramto.com, blog]Exception in thread "main" java.lang.IllegalStateException: stream has already been operated upon or closed at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:246) at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:517) at com.javaprogramto.java8.streams.toarray.CustomIntFunctionStreamToArray.main(CustomIntFunctionStreamToArray.java:19)
8. Conclusion
Java 8 Stream Collect to List
1. Overview
الثلاثاء، 23 نوفمبر 2021
Java - How to return empty array?
1. Overview
Java Copy Array - 4 Ways to copy from one to another Array
1. Overview
2. Copy Array Using Another Reference
import java.util.Arrays; public class CopyArrayRefAssignment { public static void main(String[] args) { // creating an array int[] originalArray = { 1, 2, 3, 4, 5 }; // assigning to the original array to new ref. int[] copiedArray = originalArray; // printing the arrays System.out.println("Original Array : " + Arrays.toString(originalArray)); System.out.println("Copied Array : " + Arrays.toString(copiedArray)); // changing the values in the original array originalArray[0] = 100; originalArray[4] = 500; // printing both arrays after modification System.out.println("\nPrinting values after original array modifications"); System.out.println("Modified Original Array : " + Arrays.toString(originalArray)); System.out.println("Copied Array : " + Arrays.toString(copiedArray)); } }
Original Array : [1, 2, 3, 4, 5] Copied Array : [1, 2, 3, 4, 5] Printing values after original array modifications Modified Original Array : [100, 2, 3, 4, 500] Copied Array : [100, 2, 3, 4, 500]
3. Copy Array Using Iteration
public class CopyArrayRefIterateExample { public static void main(String[] args) { // creating an array int[] originalArray = { 1, 2, 3, 4, 5 }; // assigning to the original array to new ref. int[] copiedArray = new int[originalArray.length]; // iterating array and assigning to the new array for (int i = 0; i < originalArray.length; i++) { copiedArray[i] = originalArray[i]; } // printing the arrays System.out.println("Original Array : " + Arrays.toString(originalArray)); System.out.println("Copied Array : " + Arrays.toString(copiedArray)); // changing the values in the original array originalArray[0] = 100; originalArray[4] = 500; // printing both arrays after modification System.out.println("\nPrinting values after original array modifications"); System.out.println("Modified Original Array : " + Arrays.toString(originalArray)); System.out.println("Copied Array : " + Arrays.toString(copiedArray)); } }
Original Array : [1, 2, 3, 4, 5] Copied Array : [1, 2, 3, 4, 5] Printing values after original array modifications Modified Original Array : [100, 2, 3, 4, 500] Copied Array : [1, 2, 3, 4, 5]
4. Copy Array Using Clone Approach
public class CopyArrayCloneExample { public static void main(String[] args) { // creating an array int[] originalArray = { 1, 2, 3, 4, 5 }; // cloning array using clone() method int[] copiedArray = originalArray.clone(); // printing the arrays System.out.println("Original Array : " + Arrays.toString(originalArray)); System.out.println("Copied Array : " + Arrays.toString(copiedArray)); // changing the values in the original array originalArray[0] = 100; originalArray[4] = 500; // printing both arrays after modification System.out.println("\nPrinting values after original array modifications"); System.out.println("Modified Original Array : " + Arrays.toString(originalArray)); System.out.println("Copied Array : " + Arrays.toString(copiedArray)); } }
Original Array : [1, 2, 3, 4, 5] Copied Array : [1, 2, 3, 4, 5] Printing values after original array modifications Modified Original Array : [100, 2, 3, 4, 500] Copied Array : [1, 2, 3, 4, 5]
5. Copy Array Using System.arraycopy() Method
public class CopyArraySystemArraycopyExample { public static void main(String[] args) { // creating an array int[] originalArray = { 1, 2, 3, 4, 5 }; // Creating a new array as same as original. int[] copiedArray = new int[originalArray.length]; // cloning array using clone() method System.arraycopy(originalArray, 0, copiedArray, 0, originalArray.length); // printing the arrays System.out.println("Original Array : " + Arrays.toString(originalArray)); System.out.println("Copied Array : " + Arrays.toString(copiedArray)); // changing the values in the original array originalArray[0] = 100; originalArray[4] = 500; // printing both arrays after modification System.out.println("\nPrinting values after original array modifications"); System.out.println("Modified Original Array : " + Arrays.toString(originalArray)); System.out.println("Copied Array : " + Arrays.toString(copiedArray)); } }
6. Conclusion
Java forEachRemaining() - Iterator foreach example in JDK 8
1. Overview
boolean hasNext() E next() default void remove()
الاثنين، 22 نوفمبر 2021
Java Arrays - How to return array in java from method?
1, Overview
Thump rules:
- A method can return an array that is referencing another array.
- The return type of method must be declared as the correct array type.
Java Get Current Timestamp
1. Overview
Java Event Handler - Events and Listeners Examples
1. Overview
Building First Spring Boot REST API Application (Hello World Example)
1. Overview
In this tutorial, You'll learn how to create the first spring boot application in Spring Boot. This is like spring boot Hello world example. You will learn today how to create a spring boot rest API application from scratch step by step.
Spring Boot is a subproject initiative done by the spring core development team. It manages internally many things for us automatically such as managing dependencies, spring traditional configurations, deploying in embed tomcat server and hosting as rest API.
Spring Boot 2.2.1
Java 1.8
Java HashMap with Example Programs + Java 8 Methods
1. Introduction
In this tutorial, We'll be learning HashMap API and its usage. HashMap is one of the implementations of the Map interface. HashMap is widely used in the realtime applications to store the key-value pair. This supports all kinds of operations needed on a daily basis to work on the dataset. This comes with most used built-in utility methods to add the values into map(), replace(), remove(), get() methods. We'll be showing java 8 new API changes to the HashMap such as compute(), replaceAll(), computeIfAbsent(), computeIfPresent(), merge() methods.
public class HashMap<K,V> extends AbstractMap<K,V>
implements Map<K,V>, Cloneable, Serializable
HashMap helps one object as an index to another object as the value. List index will be always a number whereas in Map it can be String, Integer, Float or Student or Trade objects.
Let us explore the most useful methods step by step.
Top 5 Spring Boot Ebooks - Developers Must Read in this year
Best Spring Boot Books
1. Introduction
In this article, We'll show the best books to read and learn Spring Boot from beginner to becoming an expert in this year.
In general, Many developers struggle to find the best books to learn any technology. Here, you will get the most useful to the beginner's step by the steep learning curve and with a clear explanation.
Spring Boot Tutorials
الأحد، 21 نوفمبر 2021
[Fixed] org.apache.tomcat.util.bcel.classfile.classformatexception: invalid byte tag in constant pool: 19
1. ClassFormatException: Invalid byte tag in constant pool: 15 Overview
In this tutorial, We'll learn how to fix org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 15. This is a common issue while working with Tomcat 7 or Tomcat 8 version. We'll provide you the various solutions to fix this error permanently.
Addition to this issue, you can find the other set of trouble shooting problems.
[Fixed] Java 8: Invalid byte tag in constant pool: 15 or 19 - Tomcat
Common issues on the same error. The solution is common in all cases.
Invalid byte tag in constant pool: 15 Invalid byte tag in constant pool: 16 Invalid byte tag in constant pool: 18 Invalid byte tag in constant pool: 19
Let me tell my store with this problem and how did the troubleshoot this issue.
org.apache.tomcat.util.bcel.classfile.classformatexception: invalid byte tag in constant pool: 19
I have started working with java version 1.7 and Apache Tomcat/7.0.12. After some time my mind was completely changed. Felt very curious really waiting to work with java 8 features.
Read the article on Java 8 Lambda Expressions Feature
Java 8 Predicate Examples - Conditions in JDK 8
1. Overview
In this tutorial, We'll learn how to work and use the Predicate Functional Interface.
In the previous post, We have discussed "Introduction to Functional Interfaces in Java 8". Explained an easy manner to understand the type of Functional Interfaces.
Predicate Functional interface is part of java.lang.function package.
Predicate is one of the categories of Function Interfaces (Suppliers, Consumer, Predicates and Function)
Popular Posts
- 3 Ways to Fix Git Clone "Filename too long" Error in Windows [Fixed]
- Adding/Writing Comments in Java, Comment types with Examples
- Java Program To Reverse A String Without Using String Inbuilt Function reverse()
- Java Thread.join() Examples to Wait for Another Thread
- Java IS-A and HAS-A Relationship With Examples