Interview Questions and Answers for 'Cignex datamatics' - 3 question(s) found - Order By Newest Q1. Diff between Runtime.getRunTime().gc() and System.gc() Core Java
This question was recently asked at 'CIGNEX Datamatics'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Related Questions Difference between == and .equals() ? Why is String immutable in Java ? Explain the scenerios to choose between String , StringBuilder and StringBuffer ?
or
What is the difference between String , StringBuilder and StringBuffer ? What are the difference between composition and inheritance in Java? Explain OOPs
or
Explain OOPs Principles
or
Explain OOPs Concepts
or
Explain OOPs features
or
Tell me something about OOPs What is a Lambda Expression ? What's its use ? What are different ways to create String Object? Explain. Why Char array is preferred over String for storing password? Does garbage collection guarantee that a program will not run out of memory? What is the difference between final, finally and finalize() ? Q2. How to run jar file using command prompt Core Java
This question was recently asked at 'CIGNEX Datamatics'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  jar  running jar using command line  cron entry   setting java app as cron Asked in 1 Companies Related Questions Can we generate Java Documentation using Export -> JavaDoc using a jar file ? Difference between jar , war and ear ? How can I change the default location of the generated jar when I command "mvn package"? What would you do if you have to add a jar to the project using Maven ? If you are given a choice to have a functionality shared either through dependency or through a Web service, which one will you choose ? Given 2 jars of 5 ltr and 3 ltr, how will you get 4 ltrs in one of those jars ? Can we deploy an application to server using a jar file ? What is Jar ? If you are given a Jar file , How can you go through it understand what it does Why do we have multiple core java jars in java 9 ? Q3. Can we call a static method using reference currently pointing to null. Core Java
Ans. yes, we can.
exa: public class Java{
public static void main(String... args) {
JAva j= null;
j.greeting(); // call with null reference
}
public static void greeting() {
System.out.println("Hello World");
}
} // output: Hello World Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  static methods   static Asked in 1 Companies Related Questions How can we run a java program without making any object? What are the advantages and disadvantages of static variables and static methods ? Can we access instance variables within static methods ? How can we create objects if we make the constructor private ? Similarity and Difference between static block and static method ? In which cases , moving methods to utility class could be useful ? Can we override static methods ? Why ? Can we use static method definitions in Interfaces ? Why can't we use this in static context ? Interface can only have ...