Yes, here's the equivalent code in 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.isEmpty()) {
        while (!inputStack.isEmpty()) {
            outputStack.push(inputStack.pop());
        }
    }
    return outputStack.pop();
}
}
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence