We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Hello I'm having some dificulties trying to solve problems with private classes.
I'm declaring them like this
private Class MyCalculator implements AdvancedArithmetic
{}
If someone can give me more info about private classes... I've been searching on google for the topic but i can't really find nothing relevant >.<
I'm always getting this error:
Solution.java:5: error: class, interface, or enum expected
private Class MyCalculator implements AdvancedArithmetic
^
Solution.java:7: error: class, interface, or enum expected
public abstract int divisorSum(int n)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Java Interface
You are viewing a single comment's thread. Return to all comments →
Hello I'm having some dificulties trying to solve problems with private classes.
I'm declaring them like this
private Class MyCalculator implements AdvancedArithmetic {}
If someone can give me more info about private classes... I've been searching on google for the topic but i can't really find nothing relevant >.<
I'm always getting this error:
Solution.java:5: error: class, interface, or enum expected private Class MyCalculator implements AdvancedArithmetic ^ Solution.java:7: error: class, interface, or enum expected public abstract int divisorSum(int n)