Manish Kumar
Manish Kumar
JCHJava Community | Help. Code. Learn.
Created by Manish Kumar on 2/14/2025 in #java-help
Authentication of independent Apis
suppose we have api/java/v1 api/express/v2 api/django/v3 these 3 apis and i want to use them in a single project how i authenticate users how i fetch data from apis for user
8 replies
JCHJava Community | Help. Code. Learn.
Created by Manish Kumar on 2/24/2024 in #java-help
Hibernate cfg.xml Error
No description
114 replies
JCHJava Community | Help. Code. Learn.
Created by Manish Kumar on 12/31/2023 in #java-help
Need a good Roadmap by experienced backend developer
i Need a good Roadmap by experienced backend developer. Please share your thoughts
10 replies
JCHJava Community | Help. Code. Learn.
Created by Manish Kumar on 12/29/2023 in #java-help
Installation of Servlet
actually i installed tomcat and setup everything, but when i am running index.jsp it runs and gives localhost:8080/ServLet.Mvn but when I am clicking on this it shows http 404 error
i have created the project in intelliJ by selecting maven
i have created the project in intelliJ by selecting maven
8 replies
JCHJava Community | Help. Code. Learn.
Created by Manish Kumar on 12/15/2023 in #java-help
bubble sort
class Main {
public static void main(String[] args) {
int[] nums = {5, 8, 3, 2, 1, 22, 15};

for (int i = 0; i < nums.length - 1; i++) {
for (int j = 0; j < nums.length - i - 1; j++) {
if (nums[j] > nums[j + 1]) {
int temp = nums[j];
nums[j] = nums[j + 1];
nums[j + 1] = temp;
}
}
}

for (int i = 0; i < nums.length; i++) {
System.out.println(nums[i]);
}
}
}
class Main {
public static void main(String[] args) {
int[] nums = {5, 8, 3, 2, 1, 22, 15};

for (int i = 0; i < nums.length - 1; i++) {
for (int j = 0; j < nums.length - i - 1; j++) {
if (nums[j] > nums[j + 1]) {
int temp = nums[j];
nums[j] = nums[j + 1];
nums[j + 1] = temp;
}
}
}

for (int i = 0; i < nums.length; i++) {
System.out.println(nums[i]);
}
}
}
in this bubble sort why we need 2 loops? and we used
nums[j]
nums[j]
instead of
nums[i]
nums[i]
7 replies