Being a Java beginner, I have found myself getting a good textbook, and I have learned quite a bit from it. Often times it has parts in the chapter where it talks about code structure and how to format things.
Unfortunately it does not do this for a lot of aspects of the language. Sometimes I end up doing things and showing them to my friends who go to college for computer science and they look at my code and say it looks awkwardly formatted (I only started learning to code from scratch like four months ago). I often wonder whether it is appropriate or not if I ask questions like "Is it bad form to do this~~" and then give examples of my own code, and then compare it with perhaps some other examples online.
Example
I asked a question before on an exercise from chapter two in my book, and I noticed that I had done a lot of the logic in the main method so a sub question to my original problem was
"I noticed I used a lot of logic within the main method. This is making my code look messy, is it better that I put this in another class with methods inside of it, so that my main looks short and concise and less cluttered?"
After this I presented my code, and my initial programming issue with the problem itself
Is this acceptable on Stack Overflow? Assuming I give my own example of the use in question, and some other ones? I know there is another site called Code Review, but what if I just have a more general question about formatting specific features?