Can main() method in java can return any data?



Can main() method in java can return any data?..

Answer / Dilip Singh Tomar

"Yes, the main() method in Java can return any data type. It is commonly returned as int (0 or 1) to indicate success or failure, but it can also be void, boolean, double, etc."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is operator?

3 Answers  


Explain the concept of hashtables?

1 Answers  


What is the indent key?

1 Answers  


Explain covariant method overriding in java.

1 Answers  


I need help please send me reply: Write a program "if given a string like 'HAT', the combination's returned should be like ATH,THA,TAH in java"?

4 Answers  


I have one POJO class(Java bean class), it has two variables for that it has setters and getters. Now i have created two objects for that class and i have set the data for those variables through this two objects. Now question is i want check whether those two objects have same data or not, for this write a program? Thanks, Bose.

2 Answers   Oracle,


What is abstraction in java?

1 Answers   Akamai Technologies,


What is javac in java?

1 Answers  


Is there any way to find whether software installed in the system is registered by just providing the .exe file? I have tried the following code but its just displaying the directory structure in the registry. Here the code : package com.msi.intaller; import java.util.Iterator; import ca.beq.util.win32.registry.RegistryKey; import ca.beq.util.win32.registry.RootKey; public class RegistryFinder { public static void main(String... args) throws Exception { RegistryKey.initialize(RegistryFinder.class.getResource("jRe gistryKey.dll").getFile()); RegistryKey key = new RegistryKey(RootKey.HKLM, "Software\\ODBC"); for (Iterator<RegistryKey> subkeys = key.subkeys(); subkeys.hasNext();) { RegistryKey subkey = subkeys.next(); System.out.println(subkey.getName()); // You need to check here if there's anything which matches "Mozilla FireFox". } } }

1 Answers   Google,


What is access modifiers?

1 Answers   Cap Gemini,


What is deadlock and how to avoid this?

2 Answers  


Will minecraft java be discontinued?

1 Answers  


Categories