• Post Reply Bookmark Topic Watch Topic
  • New Topic

Object Creation  RSS feed

 
Arvind Purohit
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
I want to know

1) What happen when i create
a new object using new, i want to know what goes behind calling new

2) is static is thread safe

3) creating Static class and its performance in large application

4) i declared a class as final static is it necessary to declare member method of that class as final, if specify it as final what will pe effect on performance. In large scale system

Thanks
 
Kevin Workman
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Arvind Purohit wrote:What happen when i create a new object using new, i want to know what goes behind calling new

What do you mean by "what happen"? Why do you think this matters? How would this impact you? Chances are you shouldn't even really care about what happens, because it's dependent on the implementation anyway. Or did you mean something more basic?

Arvind Purohit wrote:is static is thread safe

Again, what do you mean by "safe"? What happened when you tried it?

Arvind Purohit wrote:creating Static class and its performance in large application

That's even less of a question than your other ones. What's the problem? What's your question?

Arvind Purohit wrote:i declared a class as final static is it necessary to declare member method of that class as final, if specify it as final what will pe effect on performance. In large scale system

And again, what happened when you tried it?

What did you find when you googled these questions?
you should probably read these:

Show Some Effort
Search First

 
T Dahl
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Arvind Purohit wrote:4) i declared a class as final static is it necessary to declare member method of that class as final, if specify it as final what will pe effect on performance. In large scale system

Are you even allowed to do that? Let's try:


Illegal modifier for the class impossible; only public, abstract & final are permitted
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Posts: 12156
256
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
T Dahl wrote:
Arvind Purohit wrote:4) i declared a class as final static is it necessary to declare member method of that class as final, if specify it as final what will pe effect on performance. In large scale system

Are you even allowed to do that?

Yep:

And that partially answers Arvind's question: no you do not need to declare member methods to be final.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!