The **static** modifier in java directly relates to the class and not to the instance of the class. They are advantageous in the sense that you don't need to create an object each time to access the methods.  In the above code there's no any instance of the class named as ***MyClass*** to access the method which is ***firstMessage()***. It's because whenever you used the static modifier, you don't need to create the instance of the object.
author | leoumesh |
---|---|
permlink | learning-static-modifier-in-java |
category | hive-174578 |
json_metadata | {"tags":["java","static","programming","programmer","coding","code"],"image":["https://images.hive.blog/DQmWhT95xeS2aNqnWEMSwTFtdibPXrYT3VKGMAjww2zUZaQ/Screenshot_1.png"],"app":"hiveblog/0.1","format":"markdown"} |
created | 2020-06-17 06:02:42 |
last_update | 2020-06-17 06:02:42 |
depth | 0 |
children | 1 |
last_payout | 2020-06-24 06:02:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 3.254 HBD |
curator_payout_value | 2.728 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 556 |
author_reputation | 212,340,493,251,438 |
root_title | "LEARNING STATIC MODIFIER IN JAVA" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 98,012,731 |
net_rshares | 15,222,275,293,279 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
logic | 0 | 423,055,954,895 | 100% | ||
steemcleaners | 0 | 6,160,894,303,745 | 100% | ||
jesus.christ | 0 | 5,368,598,458 | 52% | ||
themarkymark | 0 | 2,227,918,243,215 | 10% | ||
macchiata | 0 | 27,896,050,623 | 100% | ||
buildawhale | 0 | 5,333,247,730,285 | 10% | ||
makerhacks | 0 | 11,505,329,020 | 10% | ||
upmyvote | 0 | 8,104,848,035 | 10% | ||
fun2learn | 0 | 5,252,257,636 | 2% | ||
bala41288 | 0 | 55,506,404,078 | 24% | ||
leoumesh | 0 | 37,573,694,767 | 100% | ||
ipromote | 0 | 3,370,401,109 | 10% | ||
ldh1109 | 0 | 12,591,966,082 | 100% | ||
digital.mine | 0 | 635,145,533,380 | 3% | ||
laissez-faire | 0 | 112,081,478 | 100% | ||
curbot | 0 | 200,891,305 | 10% | ||
abbenay | 0 | 1,046,227,019 | 5% | ||
delegate4food | 0 | 972,666,331 | 45% | ||
bilpcoinbpc | 0 | 1,342,311,601 | 50% | ||
hivewatchers | 0 | 177,559,143,754 | 65% | ||
thepeakstudio | 0 | 62,126,651,699 | 100% | ||
gitplait | 0 | 30,228,222,226 | 48% | ||
mynima | 0 | 262,988,095 | 20% | ||
tbb | 0 | 11,678,502 | 100% | ||
food.bot | 0 | 981,115,941 | 27% |
Nice tip for java learner. Gitplait platform is looking for people like you. Your post has been curated with @gitplait community account because this is the kind of publications we like to see in our community. Join our Community on [Hive](https://hive.blog/trending/hive-103590) and Chat with us on [Discord](https://discord.com/invite/CWCj3rw). [Gitplait-Team]
author | gitplait-mod1 |
---|---|
permlink | qc2eeu |
category | hive-174578 |
json_metadata | {"users":["gitplait"],"links":["https://hive.blog/trending/hive-103590","https://discord.com/invite/CWCj3rw"],"app":"hiveblog/0.1"} |
created | 2020-06-17 09:59:21 |
last_update | 2020-06-17 09:59:21 |
depth | 1 |
children | 0 |
last_payout | 2020-06-24 09:59:21 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 364 |
author_reputation | 64,455,719,431 |
root_title | "LEARNING STATIC MODIFIER IN JAVA" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 98,015,946 |
net_rshares | 48,682,511,096 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
gitplait | 0 | 48,682,511,096 | 78% |