DEV Community

Discussion on: How to configure VS Code Java formatting

Collapse
 
hamodey85 profile image
Mohammed Almajid

how to solve this formatting issue
converet this

    public List<Student> getStudents() {
        return List.of(new Student(1L, "Mariam", "Mariam@gmail.com", LocalDate.of(2000, Month.JANUARY, 5), 21));
    }
Enter fullscreen mode Exit fullscreen mode

To something similar to this

    public List<Student> getStudents() {
        return List.of(
                   new Student(1L, 
                                         "Mariam", 
                                          "Mariam@gmail.com", 
                                           LocalDate.of(2000, Month.JANUARY, 5), 
                                            21));
    }
Enter fullscreen mode Exit fullscreen mode
Collapse
 
marcushellberg profile image
Marcus Hellberg

I'm not really sure. You could try to change around settings in Eclipse and export a working config.