oh ok... then both kenzo and my answer are correct. egg is a side dish/appetizer, so you can use the egg to "cleanse your palette"(clear away other tastes so you can enjoy all the flavours of the main dish) before your main dish, or after main dish, along with the soup to prepare for desserts. but almost always, soup is last. it also depends on locale, in some places, soup(especially clear both, like konbu consomme, or kimo+kitsuba consomme) are served first, again, it's more of a logical thing than a customary thing. so it really depends on where you are eating and what you are eating.
sorry if the answer isn't very clear, but the general custom is like anywhere else, appetizer then main dish+side dish then soup then dessert.
also, if you are going to a japanese restaurant specifically for some special fancy food, stay away from drinking alcohol or strong flavoured drinks(juice or coke), and first taste try not to use soy sauce or other "generic" dipping sauce. it is a symbol of respect to the chef and the restaurant. you can drink or order drinks midway through eating the main dish. or in the very least, have some green tea ready to remove flavours from your mouth. japanese will think you have much respect for their food.