What is method in java with example?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More Core Java Interview Questions

What is linked hashset and its features?

0 Answers  


Explain how to convert any java object into byte array.

0 Answers  


abstract class Demo { public void show() { System.out.println("Hello I am In show method of Abstract class"); } } class Sample extends Demo { public void show() { super.show(); System.out.println("Hello I am In Sample "); } } public class Test { public static void main(String[] args) { //I WANT TO CALL THE METHOD OF BASE CLASS IT IS POSSIBLE OR NOT CAN WE USE SCOPE RESOLUTION OPERATOR TO CALL OR JAVA NOT SUPPORTED THAT :: OPERATORE } }

3 Answers  


hi to all,i have a question on static block. i saved below as test.java class test extends a { static { System.out.println("test static"); } public static void main(String []dfs) { } } class a { static { System.out.println("a static"); } public static void main(String []asdf) { } } o/p as static test static but if i change base class as test class then class test { static { System.out.println("test static"); } public static void main(String []dfs) { } } class a extends test { static { System.out.println("a static"); } public static void main(String []asdf) { } } o/p test static explain me why "a static" wasn't print in second code when it is in derived class

1 Answers  


how its run?

0 Answers  


What is the difference between multitasking and multithreading in Java

0 Answers   Sans Pareil IT Services,


what is class.forname() and how it will be useful ?

3 Answers  


What is ‘has a’’ relationship in java?

0 Answers  


Name and explain the types of ways which are used to pass arguments in any function in java.

0 Answers  


Difference between == and .equals() ?

0 Answers  


How can final class be used?

5 Answers   Accenture, Wipro,


Why does java have two ways to create child threads? Which way is better?

0 Answers  


Categories