Hey guys, i try to set a font for my needs, but ge...
# announcements
b
Hey guys, i try to set a font for my needs, but get this this is a java.awt.Font package, why compiler says me this
s
Cannot access '<init>': it is private in 'Font'
means that the constructor is private, and the class is not meant to be instantiated directly
you’ll probably want to find a factory or builder method to make a new instance
actually, looking at the docs for that class it looks like there are public constructors, this one might be the one you want:
public Font(String name, int style, int size)
❤️ 1
b
IMG_20191225_021240.jpg
Yea of course i see here two methods, but why is my class pick the private one
Oh bruh, im idiot i dont looks in a methods params...