function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
vfexp41vfexp41 

unexpected token: public at line 4 column 0

public interface ColourInt {
    String getColour();
}
public  class ColourClassBase implements ColourInt{

    public  String getColour(){
        return 'blue';
    }
}

Nilesh Jagtap (NJ)Nilesh Jagtap (NJ)
Try to include your interface and class under one parent class.

Hope this will help.
If this answers your question, mark thisa as best answer.
-N.J
ShashForceShashForce
Hi,

There cannot be 2 outer classes in a single class. Please include these as inner class of another outer class. Something like:

public class aClass {
	public interface ColourInt {
		String getColour();
	}
	public  class ColourClassBase implements ColourInt{

		public  String getColour(){
			return 'blue';
		}
	}
}

If this answers your question, please mark this as the Best Answer for this post, so that others can benefit from this post.

Thanks,
Shashank