Error 1 Inconsistent accessibility: return type is less accessible than method

Your Composite class is not public. You can’t return a non-public type from a public method.

If you don’t specify an accessibility for a non-nested class then internal is used by default. Add public to your Composite class definition:

public class Composite
{
    ...

Alternatively, if buildComposite doesn’t need to be public (meaning it’s only used internally by the form), then you could make the method private or internal as well:

private Composite buildComposite(ComboBox subs, ComboBox bas)
{
    ....

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)