Using commented dashes to divide up code chunks

I’m taking another crack at learning java with the aim of getting a job. as I write code, I sometimes find it quite difficult to navigate my code using the formatting I often see in tutorials. something I’ve found that helps me is dividing up chunks of codes with long commented dashed lines (example below).

it really helps but I’m concerned that this is generally against professional best practices or not. I find it visually appealing but will companies or other coders?

//package declaration
package word_builder; // declares the package to be used in testPackage

//----------------------------------------------------------------------------------------------------------------------
//imports
import java.util.Scanner;
//----------------------------------------------------------------------------------------------------------------------
public class rootSuffixCombine{ // creates the rootSuffix class to contain rootSuffix method
//----------------------------------------------------------------------------------------------------------------------
//methods
        public static void rootSuffix(){   // method for combining just a root and a suffix
//----------------------------------------------------------------------------------------------------------------------
            // initial prompt and scanner creation
            System.out.println("Do you want to make a word?");
            Scanner partTaker = new Scanner(System.in);
            String answer = partTaker.nextLine();
//----------------------------------------------------------------------------------------------------------------------
//variable initialization to start loops
            int x = 1;
            int y = 1;
//----------------------------------------------------------------------------------------------------------------------
// outer while loop for taking user input to either continue with program or end it
            while (x == 1){
//----------------------------------------------------------------------------------------------------------------------
// affirmative case (continues program, prints results, then asks if you want to make another)
                if (answer.equalsIgnoreCase("yes")){ // sets answer and ignores case
//----------------------------------------------------------------------------------------------------------------------

                    System.out.print("please input "root": ");  // takes the root
                    String root = partTaker.nextLine();
                    System.out.print("please input "suffix": ");  // takes the suffix
                    String suffix = partTaker.nextLine();
//----------------------------------------------------------------------------------------------------------------------
// main output
                    System.out.println("The word you created is: " + """ + root.concat(suffix) + """);
//----------------------------------------------------------------------------------------------------------------------
//resets loop in case user wants to make another word
                    y = 1;
//----------------------------------------------------------------------------------------------------------------------
                    // second while loop for creating more words
                    while (y == 1){
//----------------------------------------------------------------------------------------------------------------------
// prompts for second word
                        System.out.println("Do you want to make another word?");
                        answer = partTaker.nextLine();
//----------------------------------------------------------------------------------------------------------------------
//affirmative case
                        if (answer.equalsIgnoreCase("yes")) {
//ends second loop
                            y = 0;}
//----------------------------------------------------------------------------------------------------------------------
// negative case
                        else if (answer.equalsIgnoreCase("no")) {  //ignores case
// closes second loop
                            break;}
//----------------------------------------------------------------------------------------------------------------------
//handling non-standard answers
                         else{
                            System.out.println("sorry, i dont understand");
//resets loop
                            x = 1;
                            y = 1;}}}
// end of second loop
//----------------------------------------------------------------------------------------------------------------------
// negative case (main loop)
                else if (answer.equalsIgnoreCase("no")) {
                    System.out.println("OK, shutting down.");
                    break;} //ends loop
//----------------------------------------------------------------------------------------------------------------------
// catches non-standard response and repeats initial question until "yes" or "no" is given
                else{
                    System.out.println("I dont understand, try again.");
                    answer = partTaker.nextLine();}}}
//----------------------------------------------------------------------------------------------------------------------
// main, which runs the method(S)
    public static void main(String[] args){
        rootSuffix();}}
//----------------------------------------------------------------------------------------------------------------------
//END

with a semi-long page of code, does this come off as messy?

New contributor

KanagawaPunk is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật