Skip to main content

All Questions

Tagged with
-1 votes
1 answer
107 views

Automated code navigation for finding all types of exceptions thrown?

There is a java code base based on the Spring Boot framework. As an activity I want to navigate the code path of every API method to check for the checked exceptions that are thrown at different ...
Simrandeep Singh's user avatar
-2 votes
1 answer
591 views

Why does Java source code contain so many single-letter variables? [closed]

I have been reading the source code of some Java library classes, specifically CompletableFuture. I noticed that the authors are making extensive use of cryptic (single-letter) variables in the code, ...
Dimos's user avatar
  • 419
0 votes
1 answer
123 views

Return values and exceptions [closed]

I wrote simple function that returns a string depending on which condition is TRUE. Here is my code: private String getMyString() { if(!mStrigMember.isEmpty()) { return mStrigMember; }...
user3291059's user avatar
1 vote
1 answer
970 views

How does an optimizing compiler react to a program with nested loops?

Say you have a bunch of nested loops. public void testMethod() { for(int i = 0; i<1203; i++){ //some computation for(int k=2; k<123; k++){ //...
Force444's user avatar
  • 643
0 votes
1 answer
412 views

Familiarize with unknown source code [duplicate]

I have to continue feature development, issue fixing of a halfway completed code base. There is a no documentation, all developers had left the company. The technology stack is somewhat familiar to ...
Kasun's user avatar
  • 109
11 votes
5 answers
11k views

Java's Boolean class - why not an enum?

It seems to me that the Boolean class is an ideal candidate to be implemented as an enum. Looking at the source code, most of the class is static methods which could be moved unchanged to an enum, ...
Highland Mark's user avatar
2 votes
1 answer
1k views

Source code of jar.exe - is it available

This may seem an odd question, but I want to create an executable which runs under Windows written in C++. The program needs to be able to update a jar file even if Java is not installed on the ...
user619818's user avatar
  • 1,813
3 votes
1 answer
383 views

Distinguishing repetitive code with the same implementation

Given this sample code import java.util.ArrayList; import blackjack.model.items.Card; public class BlackJackPlayer extends Player { private double bet; private Hand hand01 = new Hand(); ...
KyelJmD's user avatar
  • 981
18 votes
11 answers
43k views

Why is using System.out.println() so bad? [closed]

Of course, it is very good use to use a logging framework for the error messages or warnings. But sometimes I use System.out.println() if I want to try something new in a short time. Is it really so ...
Kayser's user avatar
  • 376
40 votes
10 answers
49k views

Understanding already existing complex code base [duplicate]

Possible Duplicate: What is the most effective way to add functionality to unfamiliar, structurally unsound code? Till now, all I have worked on is with Java projects that I build from scratch (...
Ankit's user avatar
  • 551
22 votes
7 answers
20k views

Is it necessary to write a javadoc comment for EVERY parameter in a method's signature?

One of the devs on my team believes that it is necessary to write a javadoc comment for EVERY parameter in a method's signature. I do not think this is necessary, and in fact I think it can even be ...
sangfroid's user avatar
  • 3,249