Skip to content

Instantly share code, notes, and snippets.

View javamultiplex's full-sized avatar
🙂
Coding is life

Rohit Agarwal javamultiplex

🙂
Coding is life
View GitHub Profile
@javamultiplex
javamultiplex / FindNthNaturalNumber.java
Last active January 27, 2021 17:52
Given a positive integer N. Find Nth natural number after removing all the numbers containing digit 9 .
package com.javamultiplex.mathematics.problems;
/**
* @author Rohit Agarwal on 27/01/21 10:23 pm
* @copyright www.javamultiplex.com
*/
import java.util.Stack;
/**
@javamultiplex
javamultiplex / IllegalStateExceptionDemo.java
Created October 28, 2017 18:37
Example of IllegalStateException present in java.lang package.
package com.javamultiplex.java.lang.exceptions;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
/**
* @author Rohit Agarwal
* @version 1.0
* @category java.lang/Exception
@javamultiplex
javamultiplex / IllegalMonitorStateExceptionDemo.java
Created October 26, 2017 17:22
Example of IllegalMonitorStateException present in java.lang package.
package com.javamultiplex.java.lang.exceptions;
/**
* @author Rohit Agarwal
* @version 1.0
* @category java.lang/Exception
* @since JDK 1.0
*/
class MyThreadNew implements Runnable {
@javamultiplex
javamultiplex / IllegalArgumentExceptionDemo.java
Created October 24, 2017 19:56
Example of IllegalArgumentException present in java.lang package.
package com.javamultiplex.java.lang.exceptions;
/**
* @author Rohit Agarwal
* @version 1.0
* @category java.lang/Exception
* @since JDK 1.0
*/
class MyThread implements Runnable {
@javamultiplex
javamultiplex / IllegalAccessExceptionDemo.java
Created October 23, 2017 18:00
Example of IllegalAccessException present in java.lang package.
package com.javamultiplex.java.lang.exceptions;
/**
* @author Rohit Agarwal
* @version 1.0
* @category java.lang/Exception
* @since JDK 1.0
*/
class Test {
@javamultiplex
javamultiplex / CloneNotSupportedExceptionDemo.java
Created October 21, 2017 15:06
Example of CloneNotSupportedException present in java.lang package
package com.javamultiplex.java.lang.exceptions;
/**
* @author Rohit Agarwal
* @version 1.0
* @category java.lang/Exception
* @since JDK 1.0
*/
class Employee {
@javamultiplex
javamultiplex / ClassNotFoundExceptionDemo.java
Created October 20, 2017 14:24
Example of ClassNotFoundException present in java.lang package
package com.javamultiplex.java.lang.exceptions;
/**
* @author Rohit Agarwal
* @version 1.0
* @category java.lang/Exception
* @since JDK 1.0
*/
public class ClassNotFoundExceptionDemo {
@javamultiplex
javamultiplex / ArrayStoreExceptionDemo.java
Created October 19, 2017 09:13
Example of ArrayStoreException present in java.lang package
package com.javamultiplex.java.lang.exceptions;
/**
* @author Rohit Agarwal
* @version 1.0
* @category java.lang/Exception
* @since JDK 1.0
*/
public class ArrayStoreExceptionDemo {
@javamultiplex
javamultiplex / ArrayIndexOutOfBoundsExceptionDemo.java
Created October 18, 2017 09:00
Example of ArrayIndexOutOfBoundsException present in java.lang package
package com.javamultiplex.java.lang.exceptions;
/**
* @author Rohit Agarwal
* @version 1.0
* @category java.lang/Exception
* @since JDK 1.0
*/
public class ArrayIndexOutOfBoundsExceptionDemo {
@javamultiplex
javamultiplex / ArithmeticExceptionDemo.java
Created October 17, 2017 14:09
Example of ArithmeticException present in java.lang package
package com.javamultiplex.java.lang.exceptions;
/**
* @author Rohit Agarwal
* @version 1.0
* @category java.lang/Exception
* @since JDK 1.0
*/
public class ArithmeticExceptionDemo {