print()" in a public class named "FirstClass".
Now, we create a SecondClass .
if we import FirstClass in the new class (SecondClass), as long as we have created a public "static" method in the imported class , we should be able to dirrectly call the method "print()" there without making an object of FirstClass, shouldn't we???
I did this, but i faced an error in syntax.
the keyword "static" was suposed to be used in such situations, wasn't it?
Sounds correct yes. Mind sharing your code? (Pastebin/Hastebin/etc)
Обсуждают сегодня