tag:blogger.com,1999:blog-694855878384792308.post4123112630230848553..comments2024-03-21T06:26:49.387-07:00Comments on Java67: Top 30 OOP (Object Oriented Programming) Interview Questions Answers in Javajavin paulhttp://www.blogger.com/profile/15028902221295732276noreply@blogger.comBlogger40125tag:blogger.com,1999:blog-694855878384792308.post-91292811605841615732023-02-17T21:32:57.549-08:002023-02-17T21:32:57.549-08:00nice article
nice article<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-694855878384792308.post-4373863066354359902022-06-17T03:57:53.389-07:002022-06-17T03:57:53.389-07:00Well said, thanks for adding value. Well said, thanks for adding value. javin paulhttps://www.blogger.com/profile/15028902221295732276noreply@blogger.comtag:blogger.com,1999:blog-694855878384792308.post-43708119673976867792022-06-17T00:22:31.154-07:002022-06-17T00:22:31.154-07:00Just think like that:- static means compile time a...Just think like that:- static means compile time and overriding is run time polymorphism. so you cannot merge them. or you can learn as, "when calling of a method is decide at compile time know as overloading or static polymorphism" same as "when calling of a method decide at run time we call it run time polymorphism or dynamic polymorphism or overriding". Hope this helps<br />nitin singhhttps://www.blogger.com/profile/03640160077251435888noreply@blogger.comtag:blogger.com,1999:blog-694855878384792308.post-34902593603582214402021-09-15T22:29:12.668-07:002021-09-15T22:29:12.668-07:00it will be great if you write the answer to the po...it will be great if you write the answer to the point rather than writing some story, thats not cool and time waste click and opening each answer in different page ! NOT COOLAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-694855878384792308.post-54832389580054758502020-10-12T08:17:56.078-07:002020-10-12T08:17:56.078-07:00good, that's correct.good, that's correct. javin paulhttps://www.blogger.com/profile/15028902221295732276noreply@blogger.comtag:blogger.com,1999:blog-694855878384792308.post-73353479436408443652020-10-11T07:26:46.277-07:002020-10-11T07:26:46.277-07:00Can we override a non-static method as static in J...Can we override a non-static method as static in Java?<br /><br />No we can't it will compilation error Ankithttps://www.blogger.com/profile/04832121447202661710noreply@blogger.comtag:blogger.com,1999:blog-694855878384792308.post-85909321992430365192020-08-28T23:49:19.584-07:002020-08-28T23:49:19.584-07:00Hello Surendra, what is your point here? are you s...Hello Surendra, what is your point here? are you saying answer is wrong? Did you tried that on Eclipse or any other IDE? are you getting any error?javin paulhttps://www.blogger.com/profile/15028902221295732276noreply@blogger.comtag:blogger.com,1999:blog-694855878384792308.post-25460841184681837792020-08-25T02:37:26.044-07:002020-08-25T02:37:26.044-07:00Can we override a non-static method as static in J...Can we override a non-static method as static in Java? (answer)<br />Yes, you can override the non-static method in Java, no problem on them but it should not be private or final :)<br /><br />Either publish correct answer or remove it from the page.Surendra Vermahttps://www.blogger.com/profile/11123294021810790999noreply@blogger.comtag:blogger.com,1999:blog-694855878384792308.post-65394306633409776902020-07-15T17:22:21.615-07:002020-07-15T17:22:21.615-07:00We can not override a static method in Java. We can not override a static method in Java. Anonymoushttps://www.blogger.com/profile/01174443905568105350noreply@blogger.comtag:blogger.com,1999:blog-694855878384792308.post-47781392802018454162020-01-30T04:00:00.514-08:002020-01-30T04:00:00.514-08:00Glad that you find these OOP interview questions u...Glad that you find these OOP interview questions useful. javin paulhttps://www.blogger.com/profile/15028902221295732276noreply@blogger.comtag:blogger.com,1999:blog-694855878384792308.post-90730452905249132792020-01-24T05:30:40.574-08:002020-01-24T05:30:40.574-08:00Thanks for the collection, veery helpfulThanks for the collection, veery helpfulAnonymoushttps://www.blogger.com/profile/00809308399452538106noreply@blogger.comtag:blogger.com,1999:blog-694855878384792308.post-57858227420144476472019-12-21T04:07:58.984-08:002019-12-21T04:07:58.984-08:00Good Catch :)Good Catch :)Rishab Prasadhttps://www.blogger.com/profile/03433232551485106348noreply@blogger.comtag:blogger.com,1999:blog-694855878384792308.post-34387552816563641842019-10-24T01:31:18.352-07:002019-10-24T01:31:18.352-07:00Can we override a non-static method as static in J...Can we override a non-static method as static in Java? (answer)<br />Yes, you can override the non-static method in Java, no problem on them but it should not be private or final :) (WRONG ANS)<br /><br /><br />we can not override non static method as static .<br />it'll give compilation error. <br />AKANKSHA SHARMAhttps://www.blogger.com/profile/06327265789526232874noreply@blogger.comtag:blogger.com,1999:blog-694855878384792308.post-4396667973451394642019-09-25T07:08:49.930-07:002019-09-25T07:08:49.930-07:00But we can make it as finalBut we can make it as finalAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-694855878384792308.post-38037354523442398332019-09-19T01:55:46.228-07:002019-09-19T01:55:46.228-07:00Can we override a non-static method as static in J...Can we override a non-static method as static in Java? (answer)<br />No, it throw an compile time error -<br />This static method cannot hide the instance method from Super ClassGeekhttps://www.blogger.com/profile/04946564358110888831noreply@blogger.comtag:blogger.com,1999:blog-694855878384792308.post-85795856391820949882019-03-17T13:58:37.298-07:002019-03-17T13:58:37.298-07:00we can not override non static method as staticwe can not override non static method as staticAnonymoushttps://www.blogger.com/profile/18286607129597975871noreply@blogger.comtag:blogger.com,1999:blog-694855878384792308.post-89196137378204351172018-09-25T04:03:08.150-07:002018-09-25T04:03:08.150-07:00Regarding Vending machine design, you can check Ho...Regarding Vending machine design, you can check <a href="http://javarevisited.blogspot.sg/2016/06/design-vending-machine-in-java.html#axzz4sZVwtCgs" rel="nofollow">How to design Vending Machine in Java</a>. <br /><br />Also, I have shared a lot of <a href="http://www.java67.com/2018/05/top-20-system-design-interview-questions-answers-programming.html" rel="nofollow">system design questions</a> which is like the questions you have mentioned in the list, you can check them herejavin paulhttps://www.blogger.com/profile/15028902221295732276noreply@blogger.comtag:blogger.com,1999:blog-694855878384792308.post-36227759150302457352018-09-14T22:44:14.871-07:002018-09-14T22:44:14.871-07:00That would be less about Java and more about advan...That would be less about Java and more about advanced programming algorithms, data structures, etc.Anonymoushttps://www.blogger.com/profile/15540298335203771101noreply@blogger.comtag:blogger.com,1999:blog-694855878384792308.post-7512734750550322062018-08-11T00:49:25.550-07:002018-08-11T00:49:25.550-07:00Overall good collection... but now a days in inter...Overall good collection... but now a days in interview they ask programs...so u can add that type of questions...Once again thank you🤗Anonymoushttps://www.blogger.com/profile/02887128084689483184noreply@blogger.comtag:blogger.com,1999:blog-694855878384792308.post-6259270107819007662017-11-30T03:05:37.051-08:002017-11-30T03:05:37.051-08:00Can we change the argument list of an overriding m...Can we change the argument list of an overriding method? (answer)<br />No, you cannot. The argument list is part of the method signature and both overriding and overridden method must have the same signature.<br /><br />Can you please explain the answer what do you mean by argument list <br /><br />in overriding we can change the order of argument , number of argument then what is <br /> this argument list.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-694855878384792308.post-37705058678862960712017-11-02T19:10:43.930-07:002017-11-02T19:10:43.930-07:00Yes guys, you are right, it's not possible to ...Yes guys, you are right, it's not possible to override an instance method as static method in Java. Thanks for pointing that out. javin paulhttps://www.blogger.com/profile/15028902221295732276noreply@blogger.comtag:blogger.com,1999:blog-694855878384792308.post-27177165566725642412017-11-02T19:10:10.104-07:002017-11-02T19:10:10.104-07:00Yes Ajay, you are right, it's not possible to ...Yes Ajay, you are right, it's not possible to override a non-static method as static in Java. Thanks for pointing that out. javin paulhttps://www.blogger.com/profile/15028902221295732276noreply@blogger.comtag:blogger.com,1999:blog-694855878384792308.post-55272381801604869962017-11-02T19:09:28.681-07:002017-11-02T19:09:28.681-07:00Yes, you are right, Java doesn't allow you to ...Yes, you are right, Java doesn't allow you to override a non-static or instance method as static, I'll further check and correct. Thanks for pointing that error guys. well done.javin paulhttps://www.blogger.com/profile/15028902221295732276noreply@blogger.comtag:blogger.com,1999:blog-694855878384792308.post-520370291747977622017-11-02T07:56:12.261-07:002017-11-02T07:56:12.261-07:00Can we override a non-static method as static in J...Can we override a non-static method as static in Java?<br /><br />You answered it Yes. But it's not true. Both methods need to be either static or non-static. You can't remove staticness of a method in sub class. <br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-694855878384792308.post-62689158679851407282017-09-03T01:03:43.597-07:002017-09-03T01:03:43.597-07:00Yes , You can not override non-static method as a ...Yes , You can not override non-static method as a Static.(JVM)Anonymousnoreply@blogger.com