Zydesoft Fresher Interview questions with Answers

Zydesoft Fresher Interview questions with Answers 

This blog explains about Zydesoft Fresher Interview questions with Answers and is given below : 

Java
1. Collections in Java

The Collection in Java is a framework that provides an architecture to store and
manipulate the group of objects.

Java Collections can achieve all the operations that you perform on a data such as
searching, sorting, insertion, manipulation, and deletion.

Java Collection means a single unit of objects. Java Collection framework provides
many interfaces (Set, List, Queue, Deque) and classes (ArrayList, Vector,
LinkedList, PriorityQueue, HashSet, LinkedHashSet, TreeSet).

2. Arraylist fruits

(Get input(fruits) from user in main method and use message passing to the
another method and print the arraylist using iterators /for loop)

Create ArrayList in Java :
Java Provides 2 different ways to create an ArrayList,

Method 1 :
Creating ArrayList using Arrays class, Arrays.asList();

Syntax :

ArrayList list = new ArrayList(Arrays.asList(Object obj1, Object obj2, Object obj3,
..,objn));
Example :

import java.util.ArrayList;
import java.util.Arrays;
public class Method1 {
public static void main(String args[]) {
ArrayList<String> fruits = new ArrayList<String>(
Arrays.asList(“Apple”, “Banana”, “Grapes”,”Mango”));
System.out.println(“List of all Fruits – “+fruits);
}
}
Output :

List of all Fruits – [Apple, Banana, Grapes, Mango]
Method 2 :
Creating ArrayList using java.util.ArrayList class constructor.

Syntax :

ArrayList fruitsList = new ArrayList();
fruitsList.add(“Banana”);
fruitsList.add(“Apple”);
fruitsList.add(“Grapes”);
fruitsList.add(“Mango”);
Example :

import java.util.ArrayList;
import java.util.Arrays;
public class Sample {
public static void main(String args[]) {
ArrayList fruitsList = new ArrayList();
fruitsList.add(“Banana”);
fruitsList.add(“Apple”);
fruitsList.add(“Grapes”);
fruitsList.add(“Mango”);
System.out.println(“List of all Fruits – “+fruitsList);
}
}
Output :

List of all Fruits – [Banana, Apple, Grapes, Mango]

3. HTML

Name text box
Age. Text box
Submit
public class Student {
private Integer age;
private String name;
private Integer id;

public void setAge(Integer age) {
this.age = age;
}
public Integer getAge() {
return age;
}

public void setName(String name) {
this.name = name;
}
public String getName() {
return name;
}

public void setId(Integer id) {
this.id = id;
}
public Integer getId() {
return id;
}
}

4. How you get the image in html page

HTML Images Syntax
In HTML, images are defined with the <img> tag.

The <img> tag is empty, it contains attributes only, and does not have a closing
tag.

The src attribute specifies the URL (web address) of the image:

<img src=”url”>
The alt Attribute
The alt attribute provides an alternate text for an image, if the user for some
reason cannot view it (because of slow connection, an error in the src attribute,
or if the user uses a screen reader).

The value of the alt attribute should describe the image:

5. Different types of tag

HTML is a set of markup tags that tells the browser how to display the Web page
content.

Different types of HTML tags are:

Tag Description

<!DOCTYPE> Defines the document type

<html> Defines an HTML document

<head> Defines information about the document

<title> Defines a title for the document

<body> Defines the document’s body

<h1> to <h6> Defines HTML headings

<p> Defines a paragraph.

<br> Inserts a single line break

<hr> Defines a thematic change in the content

<!–…–> Defines a comment

6.Div

Div Tag | HTML
The div tag is known as Division tag. The Div tag is used in HTML to make divisions
of content in the web page like (text, images, header, footer, navigation bar etc).
Div tag has both open(<) and closing (>) tag and it is mandatory to close the tag.
Div tag is Block level tag
It is a generic container tag
It is used to the group of various tags of HTML so that sections can be created and
style can be Applied on them.

7. JSP
Request.getparameter

getParameter() – Passing data from client to JSP
The familiarity of the getParameter() method in getting data, especially form data,
from a client HTML page to a JSP page is dealt with here. The request.getParameter
() is being used here to retrieve form data from client side.

Steps to be followed
1) First, a html page exGetParameter.html accepts data from the client. The client
enters text in the space provided and clicks on ‘Submit’.
2) Immediately the getparam.jsp page gets called, it being mentioned in the action
tag.
3) This JSP page fetches the data using getParameter() method and displays the same
to the user.

8. Implicipt object & uses

There are 9 jsp implicit objects. These objects are created by the web container
that are available to all the jsp pages.

The available implicit objects are out, request, config, session, application etc.

A list of the 9 implicit objects is given below:

Object – Type
out – JspWriter
request –  HttpServletRequest
response –  HttpServletResponse
config – ServletConfig
application –  ServletContext
session – HttpSession
pageContext –  PageContext
page – Object
exception – Throwable

References :

https://www.javatpoint.com/collections-in-java
https://www.onlinetutorialspoint.com/java/2-ways-to-create-arraylist-in-java.html
https://www.tutorialspoint.com/springmvc/springmvc_textbox.htm
https://www.w3schools.com/html/html_images.asp
https://www.quora.com/What-are-the-different-types-of-HTML-tags
https://www.geeksforgeeks.org/div-tag-html/
https://www.geeksforgeeks.org/getparameter-passing-data-from-client-to-jsp/
https://www.javatpoint.com/jsp-implicit-objects