Posts

Showing posts with the label PDFs

MCQ of Java for Java Proficiency test [Solved PDF] - 3

All java classes are derived from A) java.lang.Class B) java.util.Name C) java.lang.Object D) java.awt.Window   The jdb is used to A) Create a jar archive B) Debug a java program C) Create C header file D) Generate java documentation   What would happen if "String[]args" is not included as argument in the main method. A) No error B) Compilation error C) Program won't run D) Program exit   For execution of DELETE SQL query in JDBC, ............. method must be used. A) executeQuery() B) executeDeleteQuery() C) executeUpdate() D) executeDelete()   Which method will a web browser call on a new applet? A) main method B) destroy method C) execute method D) init method   Which of the following is not mandatory in variable declaration? A) a semicolon B) an identifier C) an assignment D) a data type   When a program class implements an interface, it must provide behavior for A) two methods defined in that interface B) any methods in a class C) only certain methods ...

MCQ of Java - 2 [Solved PDF]

The JDBC-ODBC bridge allows ……….. to be used as ……….. A) JDBC drivers, ODBC drivers B) Drivers, Application C) ODBC drivers, JDBC drivers D) Application, drivers   Which of the following is true about Java. A) Java does not support overloading. B) Java has replaced the destructor function of C++ C) There are no header files in Java. D) All of the above.   ……………. are not machine instructions and therefore, Java interpreter generates machine code that can be directly executed by the machine that is running the Java program. A) Compiled Instructions B) Compiled code C) byte code D) Java mid code   The command javac A) Converts a java program into binary code B) Converts a java program into bytecode C) Converts a java program into machine language D) None of the above.   Which of the following is not the java primitive type A) Byte B) Float C) Character D) Long double   Command to execute compiled java program is A) java B) javac C) run D) javaw   Java Servlet ...

MCQ of Basics of Java [Solved PDF] - 1

Java programs are A) Faster than others B) Platform independent C) Not reusable D) Not scalable   Java has its origin in A) C programming language B) PERRL C) COBOL D) Oak programming language   Which one of the following is true for Java A) Java is object oriented and interpreted B) Java is efficient and faster than C C) Java is the choice of everyone. D) Java is not robust.   The command javac is used to A) debug a java program B) compile a java program C) interpret a java program D) execute a java program   Java servlets are an efficient and powerful solution for creating ………….. for the web. A) Dynamic content B) Static content C) Hardware D) Both a and b   Filters were officially introduced in the Servlet ……………… specification. A) 2.1 B) 2.3 C) 2.2 D) 2.4 Which is the root class of all AWT events A) java.awt.ActionEvent B) java.awt.AWTEvent C) java.awt.event.AWTEvent D) java.awt.event.Event   OOP features are i) Increasing productivity                   ...

[JAVA Assignment] Write a program to allow user to enter 10 Integers and writes the smallest number

Hey Friends, main motive to write this post is to enhance your programming skills by practicing it. As this is one of  my assignment question.It will very helpful you to enhace your programming skills. In this question you will use Scanner methos to input data from uses, loops and conditional Statements. Here is the Code- import java.util.Scanner; class User1 { public static void main(String args[]) { int arr[]=new int[10]; int smallest=32768, temp; Scanner input=new Scanner(System.in); System.out.println("enter 10 integers"); for(int i=0;i<10;i++) { arr[i]=input.nextInt(); } for(int i=0;i<10;i++) { if(arr[i]<smallest) { temp=smallest; smallest=arr[i]; arr[i]=temp; } } System.out.print("smallest number="+smallest); } }   You can download source code with class file from here

You all should know these free E-books

Hey friends, ​T oday I have a question for you: Which of the following resources are you using frequently in order to learn and improve your Java programming skills? - Video Courses - Online forums like  CodeRanch.com - Social hub like  StackOverflow.com - Books  (e-books and paper-books). You know, there are various sources from which you can learn. But today I’d like to talk only about books. Only books! Listen: Books! Do you agree that books are the primary sources of learning? Yes or true? Do you agree that a programmer could not be expert without reading any books? Yes or true? And when was the last time you read a Java book? Well, reading books is very important for anyone who wants to be good at something, especially for programming in general and Java programming in particular. Imagine you are coding Java without reading any books - it’s like you are trying to explore a mysterious cave without carrying a torch. So do you agree with me? Therefore, I would recommend...