#public static void (add .)
19 messages · Page 1 of 1 (latest)
Hey, @lyric haven!
Please remember to /close this post once your question has been answered!
you cannot have dots in methods
so there's absoloutely no way of doing it?
yeah that's what im talking about, that's what i want to do
i just want java to feel more like js
it is basic and looks like js that is correct but i really want everything to be simple and easy to understand
I don't mean to discourage you, but this sort of simplification of logging has already been done by SLF4J and its various implementations
public class YourConsole{
public void log(String s){
System.out.println(s);
}
}
and use it like
YourConsole console=new YourConsole();
console.log("abc");
so that you just do log.info("Hello world");
but I wouldn't do that
Java is not JS and you should accept that
yeah i already know that but i just want it to feel more easier to me as i am a javascript developer, also, i really want to focus on java and it syntaxs but at the same time i dont want to forget much 'bout javascript so i thought it is a good idea to add basic js statements to java as well.
^
appreciate it fam, 🤍