Informatics Practice Quiz: Exam!

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Sunithasoj
S
Sunithasoj
Community Contributor
Quizzes Created: 1 | Total Attempts: 309
Questions: 10 | Attempts: 310

SettingsSettingsSettings
Informatics Practice Quiz: Exam! - Quiz

.


Questions and Answers
  • 1. 

    Which of the following are open standards? .OGG .DOC .BMP .ODF

    • A.

      OGG

    • B.

      BMP

    • C.

      DOC

    • D.

      ODF

    Correct Answer(s)
    A. OGG
    D. ODF
    Explanation
    The correct answer is OGG and ODF. OGG is an open standard for audio file formats, while ODF is an open standard for document file formats. BMP and DOC, on the other hand, are not open standards. BMP is a raster graphics image file format owned by Microsoft, and DOC is a file format used for Microsoft Word documents.

    Rate this question:

  • 2. 

    Name the assignment operator used in Java.

    • A.

      <=

    • B.

      ==

    • C.

      =

    Correct Answer
    C. =
    Explanation
    The assignment operator used in Java is "=" which is used to assign a value to a variable.

    Rate this question:

  • 3. 

    Prachi is working with the following swing controls: jButton, jLabel, jTextField, jCheckBox. Suggest her any two basic methods commonly available with all the four controls mentioned above.

    • A.

      SeText()

    • B.

      SetVisible()

    • C.

      SetSelected()

    • D.

      IsSelected()

    Correct Answer(s)
    A. SeText()
    B. SetVisible()
    Explanation
    The two basic methods commonly available with all the four swing controls mentioned above are setText() and setVisible(). The setText() method is used to set the text content of a control, such as a button or a label. The setVisible() method is used to set the visibility of a control, making it either visible or invisible.

    Rate this question:

  • 4. 

    Name the control which is not directly editable during run time.

    • A.

      JLabel

    • B.

      JTextArea

    • C.

      JCheckBox

    • D.

      JRadioButton

    Correct Answer
    A. JLabel
    Explanation
    The jLabel control is not directly editable during runtime. It is a non-editable component that is used to display text or images on a form. Unlike jTextArea, jCheckBox, and jRadioButton, which can be interacted with and edited by the user, the jLabel control is typically used for displaying static information or labels on a form.

    Rate this question:

  • 5. 

    Observe the given code: int ctr=10; while(ctr>5) { ctr=ctr-2; }                       How many times the above given loop will run?

    • A.

      3 times

    • B.

      4 times

    • C.

      1 times

    • D.

      Will not execute

    Correct Answer
    A. 3 times
    Explanation
    The given code initializes the variable ctr to 10. The while loop condition checks if ctr is greater than 5. Since 10 is greater than 5, the loop will run for the first time. Inside the loop, ctr is decremented by 2, so its value becomes 8. The loop condition is still true, so the loop runs for the second time. ctr is again decremented by 2, making its value 6. The loop condition is still true, so the loop runs for the third time. ctr is decremented by 2 again, making its value 4. Now, the loop condition becomes false as 4 is not greater than 5, so the loop does not run anymore. Therefore, the loop runs 3 times.

    Rate this question:

  • 6. 

    What will be an output of the following code if value of variable application is 1? switch (application) { case 0 : jTextField1.setText("RDBMS");   case 1 : jTextField1.setText("BROWSER");   case 2 : jTextField1.setText("OS");     break;   case 3 : jTextField1.setText("PHOTO EDITOR"); break;   default : jTextField1.setText("Application Software"); break;

    • A.

      BROWSER

    • B.

      OS

    • C.

      BROWSEROS

    • D.

      Application Software

    Correct Answer
    B. OS
    Explanation
    The output of the code will be "OS" because the value of the variable "application" is 1, and according to the switch statement, when the value is 1, it will execute the code block for case 1. In this case, it will set the text of the jTextField1 to "BROWSER". However, there are no break statements after each case, so the code will continue to execute the code block for case 2 as well, setting the text of jTextField1 to "OS".

    Rate this question:

  • 7. 

    Shiva has placed two radio buttons on a payment form designed in NetBeans to accept a mode of payment one out of cash or card. To his surprise, during runtime, a customer is able to select both options for a single transaction. Solution for the above problem.

    • A.

      Set visible property as True

    • B.

      Set Button group Property

    • C.

      Set The Editable Property as False

    Correct Answer
    B. Set Button group Property
    Explanation
    Setting the Button group property ensures that only one radio button can be selected at a time. This means that when the customer selects one option, the other option will automatically be deselected. This prevents the customer from selecting both options for a single transaction.

    Rate this question:

  • 8. 

    Study the following code and answer the questions that follow: String str="Green World, Clean World"; int len=str.length(),remain; remain=100-len; TextField3.setText(Integer.toString(remain)+" more characters can be entered");

    • A.

      76 more characters can be entered

    • B.

      75 more characters can be entered

    • C.

      74 more characters can be entered

    • D.

      10 more characters can be entered

    Correct Answer
    A. 76 more characters can be entered
    Explanation
    The code first calculates the length of the string "Green World, Clean World" and stores it in the variable "len". It then subtracts the length from 100 to find the remaining number of characters that can be entered. Finally, it sets the text of TextField3 to the value of "remain" concatenated with the string " more characters can be entered". Since the length of the string is 24, the value of "remain" is 100 - 24 = 76. Therefore, the correct answer is "76 more characters can be entered".

    Rate this question:

  • 9. 

    Name any two methods of string class.

    • A.

      ToString()

    • B.

      Length()

    • C.

      Substring()

    • D.

      Power()

    Correct Answer(s)
    B. Length()
    C. Substring()
    Explanation
    The given correct answer lists two methods of the string class, which are length() and substring(). The length() method is used to determine the length of a string, while the substring() method is used to extract a portion of a string based on specified indices. These methods are commonly used in string manipulation and are essential for performing various operations on strings.

    Rate this question:

  • 10. 

    Name the method which implements method overloading.

    • A.

      Concat()

    • B.

      CharAt()

    • C.

      Substring()

    • D.

      ToUpperCase()

    Correct Answer
    C. Substring()
    Explanation
    The method that implements method overloading in this case is substring(). Method overloading occurs when a class has multiple methods with the same name but different parameters. In the case of substring(), there are multiple versions of the method that can be called depending on the parameters provided. This allows for flexibility and versatility in how the method can be used.

    Rate this question:

Quiz Review Timeline +

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

  • Current Version
  • Mar 19, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Apr 18, 2020
    Quiz Created by
    Sunithasoj
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.