Answer to Question #264849 in Java | JSP | JSF for Honour

Question #264849

develop a java console application that either overhaul or automate it.

Implement the following java concept in your solution and highlight in your documentation or code where you did it:

1. Class and Object

2. File and Stream

3. Exception Handling


1
Expert's answer
2021-11-12T07:16:14-0500
public class ConsoleApplication {
  public static void main(String [] args) {
    List<Student> students = new ArrayList<Student>();
    for (int i 1; i < 11; i++) {
      students.add(new Student(i));
    }
    students.stream().forEach(s -> System.out.println(s));
  }
}
class Student {
  private int id;
  public Student(int id) {
    this.id = id;
  }
  public String toString() {
    return "" + id;
  }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS