The provided text appears to be a code snippet written in Java. Here are the corrected errors:
public static void main(String[] args) {
Queue q = new Queue();
int i, j = 2;
for (i = 1; i < 4; i++) {
q.addQueue(i * j % 7 + 3);
if (i * j % 3 == 0)
q.deleteQueue();
else if (i * j % 3 == 1)
System.out.println(q.getFront() + " ");
else
System.out.println(q.getRear() + " ");
}
while (!q.isEmpty()) {
System.out.println(q.getFront() + " ");
}
q.deleteQueue();
}