You are on page 1of 4

Hi,

As per discussion regarding job opening for Trainer – Java for our client Cognizant @ Chennai .
Kindly revert back.

There are two tests for Java Trainers as follows

1. c and SQL for 3 hrs ( 30 mcqs and 6 programs / queries form C / SQL) - Joins and sub
queries for SQL and Programming logic for C need to be concentrated

2. Java for 3 hrs(20 mcqs and 6 programs) - Collections and String functions need to be
concentrated

Model Questions

C Programs

1.Finding next prime number


2.sum of odd digit in given number
3.remove duplicate in an array
4.array sorting
5.sum of cube prime number in an array
6.count the number end with three
7.check the number is palindrome or not
8. check the number is strong number or not
9.sum the first and third max in array
10.find the repeated number in an array.

Java program

1.A integer array is given as input. find the difference between each element.
Return the index of the largest element which has the largest difference gap.
input: {2,3,4,2,3}
logic: 2-3=1,3-4=1,4-2=2,2-3=1
2 is the max diff between 4 and 2,return the index of 4(2)
output:2

2.Find the sum of the numbers in the given input string array
Input{“2AA”,”12”,”ABC”,”c1a”)
Output:6 (2+1+2+1)
Note in the above array 12 must not considered as such
i.e,it must be considered as 1,2

3.Email Validation
String input1="test@gmail.com"
1)@ & . should be present;
2)@ & . should not be repeated;
3)there should be five charcters between @ and .;
4)there should be atleast 3 characters before @ ;
5)the end of mail id should be .com;

4.I/P hashmap<String String>{"ram:hari","cisco:barfi","honeywell:cs","csc:hari"};


i/p 2="hari";
o/p string[]={"ram","csc"};

5.INPUT1= helloworld
INPUT2= 2. delete the char,if rpted twice.
if occurs more than twice,leave the first occurence and delete the duplicate
O/P= helwrd;

6. input array={red,green,blue,ivory}
sort the given array
reverse the given array
if user input is 1 it should give oth element of an reversed array.

1.A String contains a list of states and capitals. Write a method which can parse the string and
return the states and capitals as map with state as key and capital as value.
The String is in the below format.
The state and capital is separated by a delimiter (del1). There will be multiple state-capital pairs
and each state – capital pair is separated by another delimiter (del2).
Ex: Input will be tamilnadu||chennai-karanataka||bengaluru.
Here, || will be provided as del1 and - will be provided as del2.

2.In a school there are some teachers who handle two subjects (Maths and English). When the
feedback was taken their feedback was present in both Maths Feedback as well as English
Feedback. Write a method to create a consolidated feedback for the teachers for English and
Maths. For those taking both the subjects the highest feedback is taken. Write a method to
accept two maps and return a Map object containing the feedbacks of all teachers in maths and
English.
Note: HashMap contains
Key - Teacher’s name of type String
Value – Feedback of type Integer

3.Write a method to validate the age of a person. The person age is considered valid if it is
above 21 years. Accept the date of birth of the person as String in date-month-year(Ex: 23-05-
2012) format and return true if the age is greater than 21.

4.Find the Maximum span of the given array.


span is the number of elements between the duplicate element
including those 2 repeated numbers.
if the array as only one elemnt,then the span is 1.
input[]={1,2,1,1,3}
output1=4
input[]={1,2,3,4,1,1,5}
output1=6

5.Color Code Validation:


String should starts with the Character '#'.
Length of String is 7.
It should contain 6 Characters after '#' Symbol.
It should contain Characters Between 'A-F' and Digits '0-9'.
if String is acceptable then Output1=1
else Output1=-1;

The link where I had seen the similar questions

http://psvmfree.blogspot.in/2015/12/set1.html

Regards,
Niveda
STC Technologies
+91 7667339090
Scope/ TOC forJava trainer evaluation

Modules covered: Oracle PL/SQL, Core Java 1.5/1.6, JUnit 4.x, HTML, Java Script, XML, J2EE
Architecture, Servlet, JSP,J2EE Design Patterns

Level : Skill & Knowledge

Module Detailed scope


ANSI SQL Overview Of RDBMS and Oracle Database
Basic element Of SQL
SQL Statements
SQL Operators
SQL Function
SQL Expressions
Joins and Subqueries
Schema Objects
Query Flashback
Schema Objects and Query Flashback
Oracle PL/SQL Fundamental Of PL/SQL
PL/SQL Subprograms and Triggers
Cursors and PL/SQL Error handling
Cursor,Collection,Record,varrays,Exceptionhandling,Dynamic
SQL
Core Java 1.5/1.6 Introduction to OOPS
Language Fundamentals and Operators
Wrapper Classes, Selection Statements and Iteration Blocks
Access Specifiers, Constructors and Methods
Inheritance, Interfaces and Abstract Classes
Exception Handling
Strings, String Buffer and its functions.
Collections and Util package
Threads
I/O operations in JAVA
JDBC
Garbage Collection
Overview of Annotation
Updations in JDK 1.6,1.7,1.8
JUnit 4.x Testing Fundamentals
Jumpstart JUnit 4.x
About Test Annotation
Hamcrest
Parameterized Tests
Theories
HTML Introduction to HTML
Frames and Tables
Meta Information
Advanced HTML Tags
Form Elements
Various browsers & W3C Schools specification
Tools and HTML 4.0
Java Script Introduction to JavaScript
JavaScript Events and Objects
Introduction to DOM
Introduction to Ajax
Tools and FrameWork
XML DTD
Schema
SAX
DOM
JAXP
Xpath
Xquery
XSLT
J2EE Architecture Introduction to J2EE Architecture
Servlets and Java Server Pages
Servlet Web Application and HTTP basics
Understanding Java servlets
Servlet Model
Understanding Java servlets & Servlet Model
Beyond Servlet Basics
Servlet 2.5 updates
JSP Understanding JSP
JSP Model - Basics
JSP Model - Advanced
Java Beans & JSP's
Custom Tags & Libraries
Introduction to Ajax
Tools and Framework
J2EE Design Patterns GOF Pattern Introduction
Creational Patterns
Structural Patterns
Behavioral Patterns

You might also like