Skip to main content

All Questions

-2votes
1answer
180views

Vanilla interface implementations. What should I call it? [closed]

Some may think I'm kidding, but I'm really stuck on this Suppose you have some UserDao interface that you want to implement What should you call it? Here are a few points I'd like to make I firmly ...
Sergey Zolotarev's user avatar
1vote
1answer
328views

Gradle/Maven project splitting: interfaces and implementation

Assume we have a single large JVM project (the example is in Kotlin), containing code. As part of a refactoring effort, we are decoupling pieces of the code by splitting the code into multiple modules,...
Hidde's user avatar
3votes
3answers
1kviews

Java interface design: where should I put a lot of duplicate code that will be used by all subclasses?

Java interface design: where should I put a lot of duplicate code that will be used by all subclasses? interface Tuple { void method1(); } class Tuple1 implements Tuple { @Override public ...
Guo's user avatar
  • 177
-2votes
2answers
2kviews

How to pass data between multiple project modules

I'm working on a Gradle project that has several modules. The project is implemented in Kotlin. One of these modules is the main entry point to the project, which is the main module. Another module ...
Andrei's user avatar
0votes
1answer
2kviews

Class structure: How should a binary tree and it's node class be implemented in Java in terms of class files?

In implementing a binary tree in Java, should the node class be a separate class file independent of the BinaryTreeclass, or should it be a default class in the same class file as the BinaryTree class?...
aCarella's user avatar
0votes
2answers
369views

Is implementations not being interchangeable and having to cast often a code smell?

I'm building a small game similar to chess. I'd like to be able to reuse the structure for another version of checkers too. I'm modeling the games with interfaces (showing only relevant ones): ...
garci560's user avatar
3votes
1answer
2kviews

Does Java's Object.wait() really achieve nanosecond accuracy?

I was checking out the Java 8 standard library source code just out of curiosity, and found this in java/lang/Object.java. There are three methods named wait: public final native void wait(long ...
sampathsris's user avatar
63votes
6answers
28kviews

Why was C# made with "new" and "virtual+override" keywords unlike Java?

In Java there are no virtual, new, override keywords for method definition. So the working of a method is easy to understand. Cause if DerivedClass extends BaseClass and has a method with same name ...
Anirban Nag 'tintinmj''s user avatar
4votes
6answers
480views

Which is the most practical way to add functionality to this piece of code?

I'm writing an open source library which handles hexagonal grids. It mainly revolves around the HexagonalGrid and the Hexagon class. There is a HexagonalGridBuilder class which builds the grid which ...
Adam Arold's user avatar
1vote
2answers
1kviews

Languages implemented in Python?

AFAIK, Scala and Clojure are implemented in Java and Java is implemented in C. I suppose that many or most languages are implemented in C, for instance Perl, Python and SQL. I don't know much about ...
Niklas Rosencrantz's user avatar
9votes
3answers
13kviews

Why does Java's String class not implement a more efficient indexOf()?

Following the below question on Stack Overflow https://stackoverflow.com/questions/5564610/fast-alernative-for-stringindexofstring-str I got to wondering why it is that java (6 at least) not use a ...
Yaneeve's user avatar
3votes
1answer
212views

Legal aspects of Java specification implementations in other programming languages

I am planning to implement an official Java specification in a different programming language. Would this be a copyright violation? Hypothetical examples: a JMX "wrapper" library for C++ which can ...
user12065's user avatar

close