I am attempting to convert a C# abstract class to a java class that has the same encapsulation and functionality. I understand you can make a class internal in Java by declaring the class without any modifiers, and this results in a private package. I would like to achieve something similar except where the class is public, some of the methods inside the class are public and some are internal.
The class I am modifying looks as follows,
//// This is C#
public abstract class Response
{
public String Request{get; internal set;}
public String Body{get; internal set;}
}
I would like to end up with something that ideally looks like this,
//// This is Java
public abstract class Response
{
public abstract String getRequest(){}
abstract String setRequest(String r){}
public abstract String getBody(){}
abstract String setBody(String b){}
}
Can this be achieved?