what is different between static block and public static void
main??



what is different between static block and public static void main?? ..

Answer / Amit Sankalan

In Java, a static block (or static initializer block) is used to initialize static variables when the class is loaded. A public static void main(String[] args) method is the entry point for executing a Java application.nnThe main difference between them is that the static block initializes the class-level variables, while the main method serves as the starting point of execution.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Engineering AllOther Interview Questions

hai iam selected in po exam in allahabad bank . my interview date is 02-06-2009. so plese send me some sample question on my email. my email is nitinbikhani@yahoo.com

0 Answers  


When to use Stub and Not So Stubby Area? 10. How to get the external routes without making area Not So Stubby?

1 Answers   Network,


what is the best thing in engineering?

1 Answers   Vastu Vihar,


I want to prepare for PSU's bt i dont know how many PSU's are open for computer science students and what is the competition level for these. So if anybody knows this please guide me through this.

1 Answers  


am a textile eng. frombut with major of my course including chemical eng, subjects, can i too apply to the co.?

1 Answers  


Sketch a velocity time graph for a skydiver jumping out of a plane.

1 Answers  


An inversion is an array of numbers is any pair (i,j) such that i<j and A[i]>A[j]. What is the average number of inversions in an array of n distinct numbers? plz GIVE ME SOLUTION

1 Answers   TCS,


I found that there is no display on monitor even after the cpu have done its booting succesfuly....VGA port is normal and RAM was also been checked. What may the problem...please guide..thanks.

1 Answers  


What are the different types of testing? What is SDLC? Manual of automated?How to choose among these two?

0 Answers   Sinertel,


I attended an interview with CGI last week for network engineer and here are the questions that might help you guys who are going to attend interviews.

1 Answers   CGI,


#include<stdio.h> int main(){ int a=5; printf("%d %d %d",a++,a++,++a); return 0; }..please explain me output 7 6 8..Thnx in advance

1 Answers  


write a progremme using function 0f prime no.?

1 Answers  


Categories
  • Civil Engineering Interview Questions Civil Engineering (5086)
  • Mechanical Engineering Interview Questions Mechanical Engineering (4453)
  • Electrical Engineering Interview Questions Electrical Engineering (16638)
  • Electronics Communications Interview Questions Electronics Communications (3918)
  • Chemical Engineering Interview Questions Chemical Engineering (1095)
  • Aeronautical Engineering Interview Questions Aeronautical Engineering (239)
  • Bio Engineering Interview Questions Bio Engineering (96)
  • Metallurgy Interview Questions Metallurgy (361)
  • Industrial Engineering Interview Questions Industrial Engineering (259)
  • Instrumentation Interview Questions Instrumentation (3014)
  • Automobile Engineering Interview Questions Automobile Engineering (332)
  • Mechatronics Engineering Interview Questions Mechatronics Engineering (97)
  • Marine Engineering Interview Questions Marine Engineering (124)
  • Power Plant Engineering Interview Questions Power Plant Engineering (172)
  • Textile Engineering Interview Questions Textile Engineering (575)
  • Production Engineering Interview Questions Production Engineering (25)
  • Satellite Systems Engineering Interview Questions Satellite Systems Engineering (106)
  • Engineering AllOther Interview Questions Engineering AllOther (1379)