Update UserService.java

Signed-off-by: jeet041 <mahorjitendra@gmail.com>
This commit is contained in:
jeet041 2025-04-24 01:13:05 +05:30 committed by GitHub
parent 962375a7fe
commit 7c693ec2df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,21 +1,26 @@
public class UserService {
public String getUserName(int userId) {
return "User" + userId;
return "Main: User_" + userId;
}
public boolean isUserActive(int userId) {
System.out.println("Checking DB for active user");
return true;
}
public void updateUserStatus(int userId, boolean isActive) {
// Update user status in DB
System.out.println("Main branch: status set to " + isActive);
}
public void notifyUser(int userId) {
// Send notification
System.out.println("Main: sending notification to user " + userId);
}
public void deleteUser(int userId) {
// Delete user logic
logDeletion(userId);
}
private void logDeletion(int userId) {
System.out.println("Main: user " + userId + " deleted");
}
}