はい、同じロジックのJava実装です：

```
import java.util.Stack;

public class QueueUsingStacks {
    private Stack<Integer> inputStack;
    private Stack<Integer> outputStack;

    public QueueUsingStacks() {
        inputStack = new Stack<>();
        outputStack = new Stack<>();
    }

    public void enqueue(int item) {
        inputStack.push(item);
    }

    public int dequeue() {
        if (outputStack.empty()) {
            while (!inputStack.empty()) {
                outputStack.push(inputStack.pop());
            }
        }
        return outputStack.pop();
    }
}
```
Yes, here's a Java implementation of the same logic:

import java.util.Stack;

public class QueueUsingStacks {
    private Stack<Integer> inputStack;
    private Stack<Integer> outputStack;

    public QueueUsingStacks() {
        inputStack = new Stack<>();
        outputStack = new Stack<>();
    }

    public void enqueue(int item) {
        inputStack.push(item);
    }

    public int dequeue() {
        if (outputStack.empty()) {
            while (!inputStack.empty()) {
                outputStack.push(inputStack.pop());
            }
        }
        return outputStack.pop();
    }
}