I have a program that runs in a few threads. The main thread shares an object with the other threads and in the main I have a call to:
synchronized(obj){
As others already answered, you can indeed set a priority to a thread as follows:
Thread.currentThread().setPriority(priority);
But please be aware, in your example, that thread priority has nothing to do in which order threads get access to a synchronized object. Java uses other criteria to give access. See for example this.