Which class is super class of every class

What modifiers can used with local inner class

Answer : You could use all modifier when you define inner class as shown below:

package com.javahonk.innerclasstest;

public class OuterClass {

	class InnerClass {}

	public class InnerClass2 {}

	protected class InnerClass3 {}

	private class InnerClass4 {}

	static class InnerClass5 {}

	final class InnerClass6 {}

	abstract class InnerClass7 {}
}

 

Leave a Reply

Your email address will not be published. Required fields are marked *