Join Regular Classroom : Visit ClassroomTech

Hexaware Overall Interview Questions + Coding Solutions – codewindow.in

Hot Topics

Hexaware Solution

Technical Round

Java multi-threading.

Multi-threading in Java refers to the execution of more than one thread simultaneously for maximum utilization of CPU.

What are Java 9 features?

Features of Java 9 are:
  • Interface Private Methods 
  • Platform Module System
  • Try-with Resources
  • The Java Shell (REPL)
  • Control Panel
  • Stream API Improvement
  • New version-String Scheme

Explain project you have worked on during graduation.

Tell about the topic of graduation project as well as explain it totally.

What is polymorphism in OOPS concept describe it with an example?

Polymorphism is briefly described as “one interface, many implementation”. Polymorphism is a characteristic of being able to assign a different meaning or usage to something in different contexts specifically, to allow an entity such as a variable, a function, or an object to have more than one form. There are two types of polymorphism:
  1. Compile time polymorphism
  2. Run time polymorphism

They asked me to input a string and then give as output the number of occurrence of each letter present in the string.

Here’s an example of counting the number of occurrences of each letter in a given string in C:
#include<stdio.h>
#include<string.h>
 
#define MAX_CHAR 256
 
void printFrequency(char *str)
{
    int count[MAX_CHAR] = {0};
    int i;
    int n = strlen(str);
 
    for (i = 0; i < n; i++)
        count[str[i]]++;
 
    for (i = 0; i < MAX_CHAR; i++)
        if (count[i] != 0)
            printf("%c occurs %d times in the given string.\n", i, count[i]);
}
 
int main()
{
    char str[100];
    printf("Enter a string: ");
    scanf("%s", str);
    printFrequency(str);
    return 0;
}
/*
OUTPUT -
Enter a string: 56464
4 occurs 2 times in the given string.
5 occurs 1 times in the given string.
6 occurs 2 times in the given string.
*/

What are the different methods for Sequential Supervised Learning?

Different methods for Sequential Supervised Learning are:
  • The sliding window method
  • Recurrent sliding window
  • Hidden Markov Models and Related Methods
  • Conditional Random Fields
  • Graph Transformer Networks

Why would you say cloud computing is faster?

Cloud computing is faster because:
  • Better Network Performance
  • Uptime guarantees
  • Automatic performance upgrades
  • Faster product development and deployment
  • Automatic scaling and load-balancing
  • Standardization

What is the program logic for 1 to 10 sum?

#include<stdio.h>
int main()
{
    int  i, sum = 0;
    
    for (i = 1; i &lt;= 10; i++)
    {
        sum = sum + i;
        printf(&quot;%d &quot;,i);   
    }
    
    printf(&quot;\n %d&quot;, sum);
}
/*
OUTPUT:
1 2 3 4 5 6 7 8 9 10 
 55
*/

Can you solve any hard math with easy equation and can you implement it in the computer?

Yes

How would you sort the keys in a Hash map?

To sort the keys in a Hash map we can use following two methods:
  • By using Tree Map
  • By using Linked Hash Map

Features of object oriented programming.

Important features of OOPs are 
  • Inheritance: It is a concept of Object Oriented Programming in which a new class is created from the existing one.
  • Polymorphism: Poly means many and morph means form. A concept that enables programmers to assign a different meaning or usage to a variable, function or an object in different context.
 
Polymorphism can be of two types:
  1. Runtime Polymorphism
  2. Compile Time Polymorphism
  • Abstraction: Creating a new data type using encapsulated items that is well suited for an application.
  • Encapsulation: It is called data hiding and encapsulation is the way of packing data and function into a single unit to hide the implementation details of a class from outer world.
  • Method Overriding: In place of inheritance if the parent class and child class both have the same method signature then child class method overrides the parent class method.
  • Method Overloading: If a class has more than one method with the same method name with variety of parameter list then method will be overloaded.
  • Object: Object is the reality of a class.
  • Class: Class is a blue print of similar type of objects.
  • Constructor: Constructor is a special member function that is automatically invoked at the time of object creation and does not have any return type.

Explain Abstract class?

Abstract class in Java is special kind of class which is declared with the abstract keyword which cannot be used to create objects. It can contain both abstract and non-abstract methods.

 State difference between Package and Interface.

Package
Interface
1. It is created using the “package” keyword.
It is created using the “interface” keyword.
2. It is a collection or group of classes and/or interfaces together.
It is a collection off abstract method and constants.
3. It can be imported.
It can be extended by another interface and also implemented by a class.

Does Java support multiple inheritances or not?

If a child class inherits the property from multiple classes in known as multiple inheritance. Java does not allow to extend multiple classes.
The problem with multiple inheritance is that if multiple parent classes have the same method name, then at runtime it becomes difficult for the compiler to decide which method to execute from the child class.
Therefore, Java does not support multiple inheritance. This problem is often referred to as diamond problem.
But the concept of multiple inheritance can be achieved through interfaces

 Explain inheritance.

Inheritance is a mechanism in which an object acquires properties from its parent object.

 What types of instance variables are there?

Types of instance variables are:
  • boolean
  • byte
  • short
  • int
  • double
  • float
  • long
  • char

What do near, far & huge pointer means?

Near Pointer
Far Pointer
Huge Pointer
Near pointer is used to store address of any variable whose maximum size is 16-bits i.e. we can only access 64kb of data at a time.
Far pointer is a 32 bits size pointer which can also access information stored outside the computer’s memory from the current segment.
Huge pointer is similar to that of far pointer but it has some advantages such as the part of the sector in which they are stored or located cannot be changed or modified.

What do you mean by recursion function?

Recursion function is a self-calling function with a terminating condition.

Nagarro Solved

Automata Fixing

      

We Love to Support you

Go through our study material. Your Job is awaiting.

Recent Posts
Categories