Java Developer Internship – Supporting Document
This document will guide interns through the Week 1 tasks mentioned in the Java
Developer Internship. It includes setup instructions, examples, and learning outcomes for
each task.
1. Console-Based To-Do List App
Objective: Build a simple console-based task manager where users can add, view, mark
complete, and delete tasks.
Key Concepts: ArrayList, Loops, Conditionals, File Handling (for data persistence)
Setup Instructions:
1 Install JDK 17+ and a code editor (IntelliJ IDEA, Eclipse, or VS Code).
2 Create a new Java project and a class named `[Link]`.
3 Use an ArrayList to store tasks as strings or custom objects.
4 Implement methods for adding, listing, marking as done, and deleting tasks.
5 Use File Handling to save and load tasks from a text file.
Example Code Snippet:
ArrayList tasks = new ArrayList<>(); Scanner sc = new Scanner([Link]); while (true) {
[Link]("1. Add Task 2. View Tasks 3. Delete Task 4. Exit"); int choice =
[Link](); [Link](); if (choice == 1) { [Link]("Enter task: ");
[Link]([Link]()); } else if (choice == 2) { for (int i = 0; i < [Link](); i++)
[Link]((i+1) + ". " + [Link](i)); } else if (choice == 3) {
[Link]("Enter task number to delete: "); int index = [Link]();
[Link](index - 1); } else break; }
2. Database CRUD (JDBC + SQLite/MySQL)
Objective: Create a Java program that performs CRUD operations on student records
using JDBC.
Key Concepts: JDBC Connection, Prepared Statements, SQL Queries, Exception
Handling
Setup Instructions:
1 Install MySQL or SQLite on your system.
2 Create a database named `studentdb` and a table `students(id INT, name
VARCHAR(50), email VARCHAR(50))`.
3 Add the JDBC driver JAR to your project build path.
4 Write Java code to connect to the database using `[Link]()`.
5 Implement methods for INSERT, SELECT, UPDATE, and DELETE operations.
Sample JDBC Code Snippet:
Connection conn =
[Link]("jdbc:mysql://localhost:3306/studentdb", "root",
"password"); PreparedStatement stmt = [Link]("INSERT INTO students
VALUES (?, ?, ?)"); [Link](1, 1); [Link](2, "John Doe"); [Link](3,
"john@[Link]"); [Link](); [Link]();
3. Basic REST API using Spring Boot
Objective: Develop a REST API that returns internship postings in JSON format.
Key Concepts: RESTful Endpoints, Spring Boot, JSON, Controller Layer
Setup Instructions:
1 Install Java 17+ and Spring Boot CLI or use Spring Initializr ([Link]
2 Create a new Spring Boot project with dependencies: Spring Web.
3 Define a model class `[Link]` with fields like title, duration, and stipend.
4 Create a controller class `[Link]` with endpoint `/internships`.
5 Return a list of sample internship postings in JSON format.
Sample REST Controller Code:
@RestController public class InternshipController { @GetMapping("/internships") public
List> getInternships() { List> internships = new ArrayList<>(); Map post = new
HashMap<>(); [Link]("title", "Java Developer Intern"); [Link]("duration", "3 Months");
[Link]("stipend", "■10,000"); [Link](post); return internships; } }
Learning Outcomes:
1 Understand Java fundamentals and data structures.
2 Learn JDBC for database connectivity and CRUD operations.
3 Gain hands-on experience with REST APIs using Spring Boot.
4 Build complete backend systems ready for integration with front-end applications.
Submission: Interns should submit the source code (ZIP file) and a short demo video
explaining their project functionality.