What are inline functions ? Do we have inline functions in Java ?
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Interview Questions and Answers

 Q1. What are inline functions ? Do we have inline functions in Java ?Core Java
Ans. Inline functions , just like C++ Macros is an optimized technique used by compiler to reduce the execution time. If the function is working on pre identified values ( which aren't resolved at runtime ), the function can execute the method and evaluate the outcome at compile time only instead of making a function call at runtime.

In Java, the optimizations are usually done at the runtime or JVM level. At runtime, the JVM perform some analysis to determine which methods to inline. Java compiler would never inline any method and there is no way in java for the developer to explicitly define inlining of methods as it's take intrinsically care of during runtime only.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     inline functions  inline methods


Related Questions

  What are the advantages and disadvantages of static variables and static methods ?
  What are the methods of Object Class ?
 Which of the following are valid declarations

1. void method(int... x){};
2. void method(int.. x){};
3. void method(int.. .x){};
4. void method(int ...x){};
5. void method(int... x){};
6. void method(int ... x){};
7. void method(int x, int... y){};
8. void method(int... x, int y){};
9. void method(int... x,int... y){};
 Which of the following can be marked static ?

a. Methods , Variables and Initialization Blocks.
b. Methods , Variables , Initialization Blocks and Outer Classes and nested Classes.
c. Methods , Variables , Initialization Blocks and Outer Classes.
d. Methods , Variables , Initialization Blocks and nested Classes
 Can we have multiple main methods in a single class ?
 Why can't we have diamond problem with interfaces ?
  Which String class does not override the equals() and hashCode() methods, inheriting them directly from class Object?
  Can we access instance variables within static methods ?
 What is the difference between these two method declarations ?

private static void method(String[] arg)

and

private static void method(String... arg)
  Can we declare interface methods as private ?



Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: