• Post Reply Bookmark Topic Watch Topic
  • New Topic

Default values for static variables

 
Duran Harris
Ranch Hand
Posts: 608
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do default values work with static variables??
 
Himanshu Gupta
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All primitives get default value as 0 and all Object gets Null. Try to make a small program and run it to see the results.
 
Duran Harris
Ranch Hand
Posts: 608
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's ok.I trust you :lol:
 
Himanshu Gupta
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well if you will do it yourself you will never forget it. I know that you know this point but still just to remind you. And thanks for having trust in me.
 
Henry Wong
author
Sheriff
Posts: 22619
111
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Agreed... if you try it yourself, it will more likely to be remembered. Hands-on memory is always better than just rote reading memory.

Henry
 
Duran Harris
Ranch Hand
Posts: 608
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Duran Harris
Ranch Hand
Posts: 608
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What on earth is Jini and Java gems??
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 15758
74
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jini, Java Gems (easily found with Google). Both these do not have anything to do with the SCJP exam.
 
Henry Wong
author
Sheriff
Posts: 22619
111
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jesper Young wrote:Jini, Java Gems (easily found with Google). Both these do not have anything to do with the SCJP exam.


In the mid to late 90's, there was a magazine called the "Java Report", which was dedicated to all things Java. I was a semi regular columnist for that magazine. The magazine lasted a few years, eventually ceasing production in the late 90's.

Years later, a book title "Java Gems" was released, which contain chosen articles from the magazine.

Henry
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!