Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

java

  1. N

    Java Scanner vs BufferedReader?

    I know both Scanner and BufferedReader in Java. However, although Scanner is easier to get user input (e.g. already converts user's input to a specific data type), and is shorter to initialize, I was taught to use BufferedReader. Is there a benefit to using BufferedReader as compared to...
  2. Ulvi_465

    Java or C#

    I need to pick one and learn, make a portfolio! I hear people saying Java is still what all big corps use so learn Java, or C# is rising and Java is falling so learn C#. I just have no idea who to listen to, what the truth is. What would you learn if you have to choose one language?
  3. jkumar85

    JavaScript Help with date difference calculation

    Need help to produce data in PHP with help of functions Like this Ex.-1 Start Date : 12-04-2023 End Date : 30-06-2023 Output: 12-04-2023 to 30-04-2023 = 19 Days May-2023 June-2023 Ex.-2 Start Date : 01-04-2023 End Date : 30-06-2023 Output: April-2023 May-2023 June-2023 Ex.-3 Start Date ...
  4. Akhter

    JavaScript Sum textbox value with Gridview Column of Credit

    i want to sum Textbox(txtamount) value with Gridview Column Credit value,and display in footer. $(function () { CalculateDebitCredittotal() }); function CalculateDebitCredittotal() { var creditTotal = 0; var debitTotal = 0; $("[id*=gvtrans]...
  5. Hilton D

    Java Java Exception Handling: Handling Checked Exceptions

    I'm working on a Java application that involves file I/O, and I'm dealing with checked exceptions, specifically FileNotFoundException when attempting to read a file. I want to handle this exception gracefully in my code. Here's a simplified version of what I'm trying to do: import...
  6. M

    Node.JS Code Assistance

    I'm currently working on a project where I need to implement a table filter using checkboxes, and I'm facing some challenges. I've managed to set up the basic functionality, but I'm struggling with a couple of specific requirements. I'm reaching out to the community for some guidance and...
  7. S

    Java Why there is no output in my code?

    package ejercicio2; import java.util.ArrayList; import java.util.Random; public class Ejercicio2 { private static ArrayList<Double> array = new ArrayList<Double>(); public static ArrayList<Double> rellenar(double min, double max, int tamaño) { Random random = new Random()...
  8. D

    JavaScript I'm trying to make a web extension that reverts youtube to an old layout, but i barely know anything about js or css

    so im trying to make a web extension that changes the current youtube layout to an old version that i plan on completely writing from scratch im trying to change the background but i think im doing it wrong this is my manifest script { "manifest_version": 3, "name"...
  9. Hilton D

    Java Differences in visual capabilities between Java applets and applications

    Is there anything a Java program can achieve that an applet cannot in terms of graphic capabilities? I'm talking about java libraries (such as Swing), not native ones. I need to design a graph visualization user interface, most likely utilizing the spring embedder technique. I saw this oracle...
  10. S

    Chess coding

    I have created a game of double chess that has been developed into an online game play.synergy chess.net I have noticed that chess.com is written in Java, JavaScript and PHP. Synergy Chess is written in ReactJS, NodeJS, Xitrium, Scala and Java. This makes it very hard to find qualified...
  11. datdatyul

    Java Spring Boot Microservices - How can I reach out another service method from another service in Junit Test.

    Hi, I have a problem about reaching out one url defnied in AuthController of auth service from any method of OrderControllerTest in order service. As I cannot reach out it, I still get 404 Not Found exception. How can I reach out it? I hope anyone can help me. Here is the link ...
  12. datdatyul

    Java Spring Boot Microservices - Spring Security Issue in one service throwing throwing java.lang.StackOverflowError in JUnit

    I have a problem in running any test method in service test and controller test in one of the spring boot microservices (order service). After I completed service and controller , I tried to write their test methods but I have a problem in there. How can I fix it? Here is the security config...
  13. SHjiwani

    Java How do I add exponents and parentheses to my code?

    This is the pastebin for my code: pastebin.com/gV01kTje Basically I have an assignment where I need to create a calculator capable of up to 3 step equations and being able to do all PEMDAS operations in PEMDAS order. So far I've gotten it up to 3 step operations and being able to do addition...
  14. B

    Java For loop to print out numbers in order

    Hi, I'm trying to write a code with for-loop to get numbers in order. For example 3,4,5,6 or -1,0,1,2,3. This is what I have come up with this far. public static void runLoop(int start, int end){ for (start <= end; start++){ System.out.print(start); } }
  15. B

    Java Do-while loop

    I'm trying to make a do-while loop that print out a + each time it runs. It works well but I need to solve how to make a condition to make in not to print a + if it runs 0 times. I get that do-while loops runs at least time but I need to make a condition. Example runLoop 4 = 4 and runLoop 7 = 7...
  16. datdatyul

    Java Spring Boot Microservice - 403 Forbidden among API Gateway and some services

    Hi , As I'ven't solved the okta issue for nearly one month, I created and auth service (creating user and login). I have a security problem about connection among auth service, api gateway and order service. After I created a user and then login, I tried to make a request to order service...
  17. datdatyul

    Java Java Stream Not Calculating the total count after filtering and grouping by

    I have a problem about writing a java stream by filtering multiple conditions , groupby multiple condition (if possible) and calculating the sum value I store the values as `Map<String(pId),List<Person>>` Here is my Person class shown below public class Person{ private...
  18. datdatyul

    Java Spring Boot Microservices - JUnit Controller Test JWT Issue

    I have a problem about solving JwtGrantedAuthoritiesConverter in order service after defining preauthorize annotation in some methods of Order Controller. After I wrote the test shown below, I tried to run it but I got this issue shown below as well. I also shared my repo as a link. How can I...
  19. datdatyul

    Java Spring Cloud API Gateway JWT Issue java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter

    I have a problem about sending any request to a defined service through api gateway with the usage of bearer token coming from login. After login, I tried to send a request to a defined service but I got this issue in JWTAuthenticationFilter of api gateway shown below. I think there can be...
  20. D

    Java How do I solve this Java riddle?

    I have the following riddle: How do I solve this in Java, using while loops? I had an idea on how to do it with for-loops, but it doesn't work using for-loops So far, all I have is the following, which seems to be going through all possible combinations, but is incredibly slow, so I suspect...
Back
Top Bottom