how can i convert code from python to java …i dont know python

size = 10
for i in range(size) :
    for j in range(size) :
        if(i == j or size - j == i + 1) :
            print("* ", end = "")
        elif(i == size/2 - 1 or j == size/2 -1 or i == size/2 or j == size/2):
            print("  ", end = "")
        elif(i == 0 or j == 0 or i == size - 1 or j == size -1):
            print("* ", end = "")
        else :
            print("  ", end = "")
    print("")

i dont know python at all ...it would be a great help if i get the code in java ...beacuse i really dont know python...its related to print pattern using for loops