JDBC Questions and answers
Java Programming
by Poonam
3y ago
1) What is JDBC? JDBC is a Java API that is used to connect and execute queries to the database. JDBC API uses JDBC drivers to connects to the database. 2) What is JDBC Driver? JDBC Driver is a software component that enables Java applications to interact with the database. There are 4 types of... The post JDBC Questions and answers appeared first on Java Programming ..read more
Visit website
Questions related to Java Server Pages
Java Programming
by Poonam
3y ago
1. Explain the various scope values for <jsp:useBean> tag.  <jsp:useBean> tag is used to use any java object in the jsp page. Some scope values are :    1)application    2)request    3)page    4)session 2. Show the 2 types of comments in JSP.  The 2 types are : <%–JSP Comment–%> <!–HTML comment–> 3. Can Static method be Override?... The post Questions related to Java Server Pages appeared first on Java Programming ..read more
Visit website
Questions related to Java Server Pages (JSP)
Java Programming
by Poonam
3y ago
1. Explain JSP and tell its uses.  JSP stands for Java Server Pages. It is a presentation layer technology independent of the platform. They are like HTML pages but with Java code pieces embedded in them. They are saved with a .jsp extension. They are compiled using the JSP compiler in the background and generate... The post Questions related to Java Server Pages (JSP) appeared first on Java Programming ..read more
Visit website
Questions Related to Java Collection
Java Programming
by Poonam
3y ago
1) What is the difference between ArrayList and Vector? ArrayList: -ArrayList is not synchronized. -ArrayList is not a legacy class. -ArrayList increases its size by 50% of the array size. .Vector: -Vector is synchronized. -Vector is a legacy class. -Vector increases its size by doubling the array size. 2) What is the difference between ArrayList... The post Questions Related to Java Collection appeared first on Java Programming ..read more
Visit website
Convert String to Integer (atoi)
Java Programming
by Poonam
3y ago
Implement atoi which converts a string to an integer. The function first discards as many whitespace characters as necessary until the first non-whitespace character is found. Then, starting from this character takes an optional initial plus or minus sign followed by as many numerical digits as possible, and interprets them as a numerical value. The string can contain additional characters after those that form the integral number, which are ignored and have no effect on the behavior of this function. If the first sequence of non-whitespace characters in str is not a valid integral number, or ..read more
Visit website
Servlets
Java Programming
by Poonam
3y ago
What are Servlets? Java Servlets are programs that run on a Web or Application server and act as a middle layer between a request coming from a Web browser or other HTTP client and databases or applications on the HTTP server. What are the advantages of servlets over CGI? Servlets offer several advantages in comparison with CGI. Performance is significantly better. Servlets execute within the address space of a Web server. It is not necessary to create a separate process to handle each client request. Servlets are platform-independent because they are written in Java. Java security manager on ..read more
Visit website
Java Collection
Java Programming
by Poonam
3y ago
Collection framework A collection framework is a grouping of classes and interfaces that is used to store and manage the objects. To overcome the limitations of the arrays go to collections. A collection is a group of individual objects. A java collection and collection framework is same as a C++ container and STL (Standard Template Library). Limitations of arrays: Fixed-size Homogeneous elements No underlying data structure – therefore, no inbuilt methods are used. Collection Advantages: Growable in nature Store homogeneous or heterogeneous objects Implemented based on the standard data st ..read more
Visit website
Remove Nth Node From End of List
Java Programming
by Poonam
3y ago
Given a linked list, remove the n-th node from the end of list and return its head. Example: Given linked list: 1->2->3->4->5 and n=2. After removing the second node from the end, the linked list becomes 1->2->3->5. Note: Given n will always be valid. Follow up: could you do this in one pass? Solution for this problem statement: public ListNode removeNthFromEnd(ListNode head, int n) { ListNode dummy = new ListNode(0); dummy.next = head; ListNode first = dummy; ListNode second = dummy; // Advances first pointer so that the gap between first and sec ..read more
Visit website
Class Variable or Static Variables
Java Programming
by Poonam
3y ago
Class variables are also known as static variables are declared with the static keyword in a class, but outside a method, constructor, or block. There would only be one copy of each class variable per class, regardless of how many objects are created from it? Static variables are rarely used other than being declared as constants. Constants are variables that are declared as public/private, final and static. Constant variables never change from their initial value. Static variables are stored in static memory. It is rare to use static variables other than declared final and used as either publ ..read more
Visit website
Add Two Numbers using Linked List
Java Programming
by Poonam
3y ago
A linked list is a linear set of data items whose order is not determined by their physical location in memory in computer science. Instead, each element points to the next. It’s a data structure made up of a number of nodes that together form a sequence. Add Two Numbers using Linked List: You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list. You may assume the two numbers do not contain any leading zero, except the number 0 its ..read more
Visit website

Follow Java Programming on FeedSpot

Continue with Google
Continue with Apple
OR