A Java Quiz

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Myhemant72
M
Myhemant72
Community Contributor
Quizzes Created: 4 | Total Attempts: 9,266
| Attempts: 1,661
SettingsSettings
Please wait...
  • 1/319 Questions

    Html is the root tag of a html document?

    • True
    • False
Please wait...
A Java Quiz - Quiz
About This Quiz

This 'A Java Quiz' challenges learners on Java programming concepts, focusing on GUI components, JDBC, and basic Java syntax. It assesses understanding of JTable functions, execution methods, input dialogs, and more, enhancing practical Java skills.


Quiz Preview

  • 2. 

    Apache server also known as HTTP server is a ___ server?

    • File

    • Web

    • Cloud

    • Cluster

    Correct Answer
    A. Web
    Explanation
    Apache server, also known as an HTTP server, is a web server. It is specifically designed to serve web pages and handle HTTP requests from clients, such as web browsers. The Apache server is widely used and highly popular in the web hosting industry due to its stability, flexibility, and security features. It is capable of delivering static and dynamic content, managing multiple websites, and supporting various programming languages and modules.

    Rate this question:

  • 3. 

    Which of the following controls can be used to submit a form?

    • Check box

    • Radio button

    • Text area

    • Submit button

    Correct Answer
    A. Submit button
    Explanation
    A submit button is used to submit a form. When a user clicks on the submit button, the form data is sent to the server for processing. This allows the user to send the information they have entered in the form to the server-side script or application. The other options listed (checkbox, radio button, and text area) are not used for submitting a form. A checkbox is used to select multiple options, a radio button is used to select a single option, and a text area is used for entering multiple lines of text.

    Rate this question:

  • 4. 

    <i> will make a word?

    • Italicized

    • Underlined

    • Bold

    • Upper Case

    Correct Answer
    A. Italicized
    Explanation
    The use of the "" tag in HTML is used to make text italicized.

    Rate this question:

  • 5. 

    Apache server also known as HTTP server is a ___ server?

    • File

    • Web

    • Cloud

    • Cluster

    Correct Answer
    A. Web
    Explanation
    Apache server, also known as HTTP server, is specifically designed to handle and deliver web content. It is used to host websites and serve web pages to users who request them through their web browsers. Apache is one of the most popular web servers and is widely used across the internet. Therefore, the correct answer is "Web."

    Rate this question:

  • 6. 

    Which command is used to drop a table? ( two words)

    Correct Answer
    drop table
    Explanation
    The command "drop table" is used to delete or remove a table from a database. It permanently removes the table and all its data from the database. This command is commonly used when a table is no longer needed or when it needs to be recreated with different structure or data.

    Rate this question:

  • 7. 

    A break statement in Java will only break the inner loop, in case of nested loops.

    • True

    • False

    Correct Answer
    A. True
    Explanation
    In Java, a break statement is used to exit a loop prematurely. When there are nested loops, a break statement will only break the innermost loop in which it is placed. This means that if there are multiple loops nested inside each other, the break statement will only terminate the inner loop and resume the execution of the outer loop. Therefore, the given statement is true.

    Rate this question:

  • 8. 

    Which topology has the advantage of short cable length? ( 1 word )

    Correct Answer
    bus
    Explanation
    The bus topology has the advantage of short cable length because all devices in the network are connected to a single cable. This eliminates the need for long cables to connect devices to a central hub or switch, resulting in shorter cable lengths overall.

    Rate this question:

  • 9. 

    Which command is used to drop a table? ( two words)

    Correct Answer
    drop table
    Explanation
    The command "drop table" is used to delete or remove a table from a database. It permanently deletes all the data and structure associated with the table. This command is commonly used in database management systems to remove unnecessary or obsolete tables.

    Rate this question:

  • 10. 

    Dropping a table will delete both table structure and data.

    • True

    • False

    Correct Answer
    A. True
    Explanation
    Dropping a table means permanently removing it from the database. This action not only deletes the table's structure, such as columns and data types, but also removes all the data stored within the table. Therefore, the statement that dropping a table deletes both the table structure and data is correct.

    Rate this question:

  • 11. 

    Savepoints need to be named?

    • True

    • False

    Correct Answer
    A. True
    Explanation
    Savepoints in a database are used to mark a specific point in a transaction where it can be rolled back to in case of an error or failure. Naming savepoints allows for better management and identification of savepoints within a transaction. It provides a way to reference specific savepoints when performing rollback or commit operations. By naming savepoints, it becomes easier to track the sequence of savepoints and their purpose within a transaction, making it a good practice to name them.

    Rate this question:

  • 12. 

    A firewall protects the Company LAN from outside threats.

    • True

    • False

    Correct Answer
    A. True
    Explanation
    A firewall is a network security device that monitors and filters incoming and outgoing network traffic based on predetermined security rules. It acts as a barrier between a company's internal network (LAN) and the outside world, protecting the LAN from unauthorized access, malware, and other external threats. By allowing only authorized traffic to pass through, a firewall helps to secure the company's network and sensitive data from potential attacks. Therefore, the statement "A firewall protects the Company LAN from outside threats" is true.

    Rate this question:

  • 13. 

    Savepoints need to be named?

    • True

    • False

    Correct Answer
    A. True
    Explanation
    Savepoints need to be named in order to be referenced later in the transaction. By assigning a name to a savepoint, it becomes possible to rollback to that specific savepoint if needed. This allows for more granular control over the transaction and enables the ability to undo specific portions of the transaction while preserving the changes made after the savepoint. Without naming savepoints, it would be difficult to identify and rollback to specific points in the transaction.

    Rate this question:

  • 14. 

    D in ACID stands for?

    Correct Answer
    Durability
    durability
    DURABILITY
    Explanation
    The correct answer is "Durability". In the ACID (Atomicity, Consistency, Isolation, Durability) acronym, the D stands for Durability. Durability refers to the property of a transaction in a database system to persist even in the event of system failures, such as power outages or crashes. It ensures that once a transaction is committed, its changes will be permanently saved and will survive any subsequent failures, guaranteeing data integrity and reliability.

    Rate this question:

  • 15. 

    P in PAN stands for____________________.

    Correct Answer
    Personal
    Explanation
    The correct answer is "Personal." The acronym PAN stands for Personal Area Network, which refers to a network of devices connected to a single person's workspace or immediate surroundings. This can include devices such as smartphones, tablets, laptops, and wearable technology. The "P" in PAN represents the personal nature of this network, as it is limited to the individual user rather than a larger network or organization.

    Rate this question:

  • 16. 

    P in PAN stands for____________________.

    Correct Answer
    Personal
    Explanation
    The correct answer is "Personal". The PAN card is a unique identification number issued to individuals and is used for various financial transactions in India. The "P" in PAN stands for "Personal" as it denotes that the card is meant for personal use and identification purposes.

    Rate this question:

  • 17. 

    The title tag is is to be defined in which section?

    • Head

    • Body

    • Html

    • Table

    Correct Answer
    A. Head
    Explanation
    The title tag is to be defined in the head section of an HTML document. This tag is used to specify the title of the webpage, which is displayed in the browser's title bar or tab. The head section contains meta information about the document, such as the character encoding, linked stylesheets, and scripts.

    Rate this question:

  • 18. 

    Any DDL statement will automatically commit a tracnsatcion under progress?

    • True

    • False

    Correct Answer
    A. True
    Explanation
    This statement is true because any Data Definition Language (DDL) statement in a database automatically commits the transaction under progress. DDL statements are used to define the database structure or schema, such as creating or altering tables, indexes, or views. Unlike Data Manipulation Language (DML) statements, which are used to manipulate data within the tables, DDL statements do not require an explicit commit statement to make the changes permanent. Once a DDL statement is executed, it immediately commits the transaction, making the changes permanent and irreversible.

    Rate this question:

  • 19. 

    By default autocommit is on?

    • True

    • False

    Correct Answer
    A. True
    Explanation
    By default, the autocommit feature is turned on in most database management systems. This means that any changes made to the database are automatically saved and committed without the need for explicit commit statements. This can be convenient for simple operations where immediate persistence of data is desired. However, it can also lead to unintended consequences if not managed properly, such as accidental data modifications. Therefore, it is important to be aware of the autocommit setting and adjust it as needed for specific use cases.

    Rate this question:

  • 20. 

    The set autocommit will enable or disable the autocommit option only for current session?

    • True

    • False

    Correct Answer
    A. True
    Explanation
    The statement is true. When the "set autocommit" command is used, it will enable or disable the autocommit option for the current session only. This means that any subsequent transactions performed within the current session will either be automatically committed or not, depending on the value set for autocommit. However, this setting will not affect other sessions or connections to the database.

    Rate this question:

  • 21. 

    Java is object oriented language because it supports classes and encapsulation?

    • True

    • False

    Correct Answer
    A. True
    Explanation
    Java is considered an object-oriented language because it supports the concept of classes and encapsulation. In Java, everything is treated as an object, and objects are instances of classes. Classes define the properties and behaviors of objects, and encapsulation allows for the bundling of data and methods within a class, providing data hiding and abstraction. These features are fundamental to object-oriented programming, making Java an object-oriented language.

    Rate this question:

  • 22. 

    Any DDL statement will automatically commit a tracnsatcion under progress?

    • True

    • False

    Correct Answer
    A. True
    Explanation
    DDL (Data Definition Language) statements in SQL, such as CREATE, ALTER, and DROP, are automatically committed by default. This means that any changes made by these statements are immediately permanent and cannot be rolled back. Unlike DML (Data Manipulation Language) statements, which can be rolled back using the ROLLBACK command, DDL statements do not require an explicit COMMIT statement to make the changes permanent. Therefore, any DDL statement will automatically commit a transaction that is in progress.

    Rate this question:

  • 23. 

    There can be only one Primary Key in the Table?

    • True

    • False

    Correct Answer
    A. True
    Explanation
    In a database table, the primary key is a unique identifier for each record. It ensures that each record in the table is uniquely identified and helps in maintaining data integrity. Having more than one primary key in a table would result in duplicate values and violate the uniqueness constraint. Therefore, there can be only one primary key in a table.

    Rate this question:

  • 24. 

    There can be only one Primary Key in a table.

    • True

    • False

    Correct Answer
    A. True
    Explanation
    In a database table, the primary key is a unique identifier for each record. It ensures that each row in the table is uniquely identified and can be accessed efficiently. Having more than one primary key in a table would contradict the purpose of a primary key, as it would no longer guarantee uniqueness. Therefore, there can only be one primary key in a table.

    Rate this question:

  • 25. 

    A break statement in Java will only break the inner loop, in case of nested loops.

    • True

    • False

    Correct Answer
    A. True
    Explanation
    In Java, a break statement is used to terminate the current loop and resume execution at the next statement after the loop. When nested loops are present, a break statement will only break out of the innermost loop and continue with the outer loop. This means that the outer loop will continue to execute until its condition is false, regardless of the break statement in the inner loop. Therefore, the given statement is true.

    Rate this question:

  • 26. 

    There can be only one Primary Key in a table.

    • True

    • False

    Correct Answer
    A. True
    Explanation
    In a relational database, a primary key is a unique identifier for each record in a table. It ensures that each record can be uniquely identified and helps maintain data integrity. By definition, there can only be one primary key in a table as it serves as the main identifier for the records. Having multiple primary keys would create ambiguity and make it difficult to uniquely identify records. Therefore, the statement "There can be only one Primary Key in a table" is true.

    Rate this question:

  • 27. 

    Which protocol does the Apache server use?

    • TCL

    • HTTP

    • SSL

    • FTP

    Correct Answer
    A. HTTP
    Explanation
    The correct answer is HTTP. The Apache server uses the HTTP protocol to communicate with clients and serve web pages. HTTP stands for Hypertext Transfer Protocol and is the foundation of data communication for the World Wide Web. It allows for the retrieval and display of web content, such as HTML documents, images, and videos, on a user's web browser. Apache, being a popular web server software, supports the HTTP protocol as its primary means of communication.

    Rate this question:

  • 28. 

    Incometaxindia.gov.in is a url of?

    • E-commerce site

    • M-commerce site

    • E-governance site

    • Educational site

    Correct Answer
    A. E-governance site
    Explanation
    The website "incometaxindia.gov.in" is a URL of an e-governance site. This can be inferred from the domain name "incometaxindia" which suggests that the website is related to income tax in India. Moreover, the ".gov.in" domain indicates that it is a government website. Therefore, it can be concluded that the correct answer is e-governance site.

    Rate this question:

  • 29. 

    Alter table command can be used to add the Primary KeY to a table?

    • True

    • False

    Correct Answer
    A. True
    Explanation
    The alter table command is used to modify the structure of an existing table in a database. One of the modifications that can be made is adding a Primary Key to a table. Therefore, the statement "alter table command can be used to add the Primary Key to a table" is true.

    Rate this question:

  • 30. 

    for using date and calender which package should be imported?

    • Math

    • Util

    • Net

    • Applet

    Correct Answer
    A. Util
    Explanation
    To use date and calendar in a program, the "Util" package should be imported. This package contains classes and methods that provide functionality for working with dates and calendars. By importing the "Util" package, we can access and use the classes and methods related to date and calendar operations in our program.

    Rate this question:

  • 31. 

    do -- while loop is exit controlled loop?

    • True

    • False

    Correct Answer
    A. True
    Explanation
    A do-while loop is an exit-controlled loop because the condition is checked at the end of the loop. This means that the loop will always execute at least once before checking the condition. If the condition is true, the loop will continue to execute, otherwise, it will exit.

    Rate this question:

  • 32. 

    <b> will make a word?

    • Italicized

    • Underlined

    • Bold

    • Upper Case

    Correct Answer
    A. Bold
    Explanation
    The correct answer is "Bold" because the question is asking which formatting option will make a word. The "" tag is used in HTML to apply bold formatting to text, so selecting the "Bold" option will achieve this effect.

    Rate this question:

  • 33. 

    Calendar class is found in which package?

    • Math

    • Util

    • Lang

    • Net

    Correct Answer
    A. Util
    Explanation
    The correct answer is "Util" because the Calendar class is a part of the java.util package. This package contains various utility classes and interfaces that are commonly used in Java programming, including the Calendar class for working with dates and times.

    Rate this question:

  • 34. 

    Which protocol does the Apache server use?

    • TCL

    • HTTP

    • SSL

    • FTP

    Correct Answer
    A. HTTP
    Explanation
    The Apache server uses the HTTP protocol. HTTP stands for Hypertext Transfer Protocol and is the primary protocol used for communication on the World Wide Web. Apache is a popular web server software that is widely used to host websites and deliver web pages to users. By using the HTTP protocol, Apache can handle requests from clients (such as web browsers) and send back the requested web pages.

    Rate this question:

  • 35. 

    If it is a composite primary key, it ought to be a table level constraint at the time of definition and not a column constraint.

    • True

    • False

    Correct Answer
    A. True
    Explanation
    A composite primary key is a primary key that consists of more than one column. In order to enforce this constraint, it should be defined at the table level rather than at the column level. This means that all the columns that make up the composite primary key must be specified together as the primary key for the table. Therefore, the statement that if it is a composite primary key, it ought to be a table level constraint is true.

    Rate this question:

  • 36. 

    Copper Cables are generally restricted to 100 metres.

    • True

    • False

    Correct Answer
    A. True
    Explanation
    Copper cables have limitations in terms of signal loss and degradation over distance. Generally, copper cables are restricted to a maximum length of 100 meters before the signal quality deteriorates significantly. This is due to the resistance and capacitance of the copper wire, which affects the transmission of electrical signals. Therefore, it is true that copper cables are generally restricted to 100 meters.

    Rate this question:

  • 37. 

    Which command is used to remove rows from a table from the database?

    • Delete

    • Drop

    • Remove

    • Clear

    Correct Answer
    A. Delete
    Explanation
    The correct answer is "Delete". The Delete command is used to remove rows from a table in a database. It allows for the deletion of specific rows based on specified conditions, or it can be used to delete all rows in a table. The Drop command is used to remove an entire table from the database. Remove and Clear are not valid commands for removing rows from a table.

    Rate this question:

  • 38. 

    Indiapost.gov.in and passportindia.gov.in are examples of?

    • E-Commerce sites

    • E-Governance sites

    • Educational Sites

    • Commercial sites

    Correct Answer
    A. E-Governance sites
    Explanation
    Indiapost.gov.in and passportindia.gov.in are examples of e-Governance sites because they are government websites that provide services and information to the public. These sites are specifically designed to facilitate and streamline government processes and interactions with citizens, such as applying for passports or accessing postal services. They aim to improve transparency, efficiency, and accessibility in government operations through the use of technology and online platforms.

    Rate this question:

  • 39. 

    A row is also called a ?

    • Tuple

    • Attribute

    • Column

    • Single data

    Correct Answer
    A. Tuple
    Explanation
    A row in a database table is also referred to as a tuple. A tuple represents a single record or instance of data within a table. It contains a collection of attributes or columns that define the properties or characteristics of that particular record. Therefore, the correct answer is tuple.

    Rate this question:

  • 40. 

    If int  a=10,b=20 what is the result of the following expression b+a*b*a

    • 4040

    • 2020

    • 6000

    • 3000

    Correct Answer
    A. 2020
    Explanation
    The expression b+a*b*a can be simplified using the order of operations. First, we multiply a by b, resulting in 10*20 = 200. Then, we multiply this result by a again, giving us 200*10 = 2000. Finally, we add b to this result, resulting in 2000+20 = 2020. Therefore, the correct answer is 2020.

    Rate this question:

  • 41. 

    WiMax technology is used in?

    • PAN

    • WAN

    • LAN

    • DAN

    Correct Answer
    A. WAN
    Explanation
    WiMax technology is used in WAN (Wide Area Network). WiMax, which stands for Worldwide Interoperability for Microwave Access, is a wireless communication technology that provides high-speed internet access over long distances. It is commonly used to connect remote areas or locations that are not easily accessible by traditional wired networks. With its wide coverage range, WiMax is ideal for establishing connections in large geographical areas, making it suitable for WAN applications.

    Rate this question:

  • 42. 

    Which of the following table constraint is used to provide a Default Value to the column?

    • Auto

    • Automatic

    • Default

    • Check

    Correct Answer
    A. Default
    Explanation
    The table constraint used to provide a default value to a column is the "Default" constraint. This constraint allows the user to specify a default value that will be used for the column if no other value is provided during insertion.

    Rate this question:

  • 43. 

    Open Office is a ________?

    • Suite like MS Office

    • OS

    • Browser

    • Spreadsheet

    Correct Answer
    A. Suite like MS Office
    Explanation
    Open Office is a suite like MS Office. This means that it is a collection of various software applications that are similar to the ones found in Microsoft Office. It includes programs like a word processor, spreadsheet, presentation software, and more. Just like MS Office, Open Office provides users with a range of tools to create and edit documents, spreadsheets, and presentations, making it a comprehensive software suite for various office tasks.

    Rate this question:

  • 44. 

    There are n1 rows in first table, n2 rows in second table. The cross join of the two tables will have how many rows?

    • N1 + n2

    • N1 * n2

    • N1 / n2

    • N2 / n1

    Correct Answer
    A. N1 * n2
    Explanation
    The cross join of two tables combines each row from the first table with every row from the second table, resulting in a total of n1 * n2 rows.

    Rate this question:

  • 45. 

    do -- while loop is exit controlled loop?

    • True

    • False

    Correct Answer
    A. True
    Explanation
    A do-while loop is an exit-controlled loop because the condition to exit the loop is checked at the end of the loop body. This means that the loop will always execute at least once, regardless of whether the condition is initially true or false. After each iteration, the condition is checked, and if it is true, the loop continues to execute. If the condition is false, the loop exits.

    Rate this question:

  • 46. 

    A in ACID stands for?

    Correct Answer
    Atomicity
    Atomic
    Explanation
    The correct answer is Atomicity. Atomicity is one of the properties in the ACID (Atomicity, Consistency, Isolation, Durability) acronym, which is used to describe the properties of a reliable database transaction. Atomicity refers to the concept that a transaction is treated as a single, indivisible unit of work. This means that either all the changes made by the transaction are committed to the database, or none of them are. In other words, a transaction is either completed in its entirety or not at all.

    Rate this question:

  • 47. 

    R in RAD stands for?

    Correct Answer
    rapid
    Explanation
    The correct answer is "rapid." The R in RAD stands for "rapid."

    Rate this question:

  • 48. 

    A group of logically related classes is called a?

    • Project

    • Solution

    • Group

    • Package

    Correct Answer
    A. Package
    Explanation
    A group of logically related classes is called a package. A package is used to organize related classes and provide a way to manage and control access to them. It helps in modularizing the code and making it more organized, maintainable, and reusable. By grouping classes into packages, it becomes easier to locate and understand the code, and also helps in avoiding naming conflicts between classes.

    Rate this question:

  • 49. 

    Open Office is a ________?

    • Suite like MS Office

    • OS

    • Browser

    • Spreadsheet

    Correct Answer
    A. Suite like MS Office
    Explanation
    Open Office is a suite like MS Office, meaning it is a collection of software applications that are similar to those found in Microsoft Office. It includes programs such as a word processor, spreadsheet, presentation software, and more.

    Rate this question:

Quiz Review Timeline (Updated): Mar 21, 2023 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 21, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Oct 15, 2010
    Quiz Created by
    Myhemant72
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.