Core java - Interview Questions and Answers for 'Mathworks' | Search Java Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com
Share

Search Interview Questions


 3235 questions in repository.
 There are more than 200 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

   



Core java - Interview Questions and Answers for 'Mathworks' - 4 question(s) found - Order By Newest

Basic and Very Frequently asked.
  Q1. What is Polymorphism in Java ?Core Java2016-11-06 09:10:54

Ans. Polymorphism means the condition of occurring in several different forms.

Polymorphism in Java is achieved in two manners

1. Static polymorphism is the polymorphic resolution identified at compile time and is achieved through function overloading whereas

2. Dynamic polymorphism is the polymorphic resolution identified at runtime and is achieved through method overriding.

  Sample Code for overloading

  Sample Code for overriding

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

   Like      Discuss      Correct / Improve     polymorphism  object oriented programming (oops)  oops concepts  oops concepts     Credit Suisse  Unbounded Solutions  Microsoft   Google  Purch  HCL Technologies  Tata Consultancy (TCS)  Wipro  Mathworks  Accenture  Accenture India  ZonOff  ZapCom  Addteq  Priceline.com  Acute Informatics  Trimax IT Infrastructure & Services   USAA  HCL Technologies  FDM Group  AppEnsure  Inov8  TIAA  Revature  Lockheed Martin  ScotiaBank  Algorhythm Tech  Aurus  Xpanxion  Bitwise Pune  GS Labs  Bitwise India  CRIF  Saggezza  Synchrony  Micro Focus  Mindtree  Zycus  Capgemini  ZapCom Group  Infosys Technologies  SLK Group  Intuit Bangalore  Quickr  Comviva Technology  Altimetrik  IDEALINVENT Technologies  Kewill  coMakeIT  Vekomy Technologies  Eze Software  State Farm  Rolta  State Street  High Radius  Cerner  TIBCO  3i Infotech  Goldman Sachs  ITC  abhra  InteractCRM  Polaris  Naggaro  Siemens  Hexaware Technologies  Skillnet solutions  Logixal Solutions Mumbai  Naaptol Mumbai  Logixal Solutions  NSETECH  Mastek Mumbai  AppAmplify Noida  HexaView Technologies  Wipro  Wittybrains Software Technologies  Meenakshi Noida  Eastern Software Systems Noida  MediaAgility Gurgaon  Daffodil Software  Oracle Gurgaon  Kellton Tech Gurgaon  Bharti Airtel Gurgaon  IHS Markit Gurgaon  Sinew Gurgaon  Grappus Gurgaon  Erricson Gurgaon  Deloitte  Accenture  Accenture India  Tech Mahindra  Patni Computers  L&T Infotech  Mphasis  Mindtree  Hexaware  Collabera  3i Infotech  IGate  Kpit Technologies  NIIT Technologies  Trianz  Persistent Systems  IT Asset  FIA-US  VanGuard  General Atomics      Basic        frequent

Try 2 Question(s) Test


 Q2. What is classpath in a project?Core Java
Admin
info@buggybread.com
Ans. ClassPath is the path where Java looks for class files to resolve the dependencies. For example - If you are using a class "xyz" in your code and have specified the respective import, Where should Java look for the definition of xyz. Java determines using the class path settings.

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

   Like      Discuss      Correct / Improve     java   classpath   classpath settings     CapitalOne  MathWorks


  Q3. What is a Destructor ? Do we have Destructors in Java ?Core Java

Ans. Destructor is used to de-allocate memory allocated by objects.

There are no destructors in Java. Alternatively, Java provides Automatic garbage collection i.e automatically releasing the un-referenced memory.

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

   Like      Discuss      Correct / Improve     destructor  garbage collection     Mahindra Comviva  Quinnox  MathWorks  Wipro  Publishers Clearing House (PCH)  Compro Technologies      Basic        frequent

Try 1 Question(s) Test


 Q4. What is TypeCasting ?Core Java2018-07-30 08:40:18

Ans. Assigning a value of one type to a variable of another type is known as Type Casting.

Example :

int x = 10;
byte y = (byte)x;

In Java, type casting is classified into two types, Widening Casting(Implicit) widening-type-conversion and Narrowing Casting (Explicitly done) narrowing-type-conversion.

Widening or Automatic type converion - Automatic Type casting take place when,the two types are compatible and the target type is larger than the source type

Example :

public class Test {
public static void main(String[] args) {
int i = 100;
long l = i; //no explicit type casting required
float f = l;//no explicit type casting required
System.out.println("Int value " i);
System.out.println("Long value " l);
System.out.println("Float value " f);
}
}

Narrowing or Explicit type conversion - When you are assigning a larger type value to a variable of smaller type, then you need to perform explicit type casting.

Example :

public class Test{
public static void main(String[] args) {
double d = 100.04;
long l = (long)d; //explicit type casting required
int i = (int)l;//explicit type casting required
System.out.println("Double value " d);
System.out.println("Long value " l);
System.out.println("Int value " i);
}
}

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

   Like      Discuss      Correct / Improve     typecasting  type casting     HBM India   Spectris Technologies  DocuPhase  Barclays  HCL Technologies  Wipro  Tata Consultancy (TCS)  Infosys  Infosys Technologies  Buypaa  Saviynt  MathWorks  Deutsche Bank  3dplm Software Solution   Symantec  Manhattan Associates  Izmo  Global Edge Software  Jacobian  Samsung India  Robert Bosch India  Vensai  Gainsight




Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner



comments powered by Disqus
 

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:
         

X Close this