Chemistry and Java Programming Quiz

Test your knowledge in chemistry (atomic structure, chemical bonds, organic chemistry, pH, solubility) and Java programming fundamentals (keywords, compilation, threads, exceptions, String operations)

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which experiences the least electrical force in an electric field?

  1. Electron
  2. Beta particle
  3. Gamma ray
  4. Alpha particle
Question 2 Multiple Choice (Single Answer)

How many moles of sugar are required to make 4 L of a saturated solution of sugar having a concentration of 0.6 mole per liter?

  1. 2.4
  2. 1.2
  3. 0.8
  4. 1.6
Question 3 Multiple Choice (Single Answer)

Sugar is not infinitely soluble in water because:

  1. when you mix enough sugar into water the solution eventually solidifies.
  2. of the strong attractions that occur between sugar molecules
  3. of the strong attractions that occur between water molecules
  4. there is only so much space between water molecules for sugar molecules to fit
Question 4 Multiple Choice (Single Answer)

Covalent and ionic bonds differ in that:

  1. ionic bonds don't involve the sharing of electrons
  2. covalent bonds are more permanent
  3. covalent bonds are much less common
  4. ionic bonds are electrical by nature
Question 5 Multiple Choice (Single Answer)

The outer shells of two atoms that are covalently bonded:

  1. cancel each other
  2. have increasing capacities for electrons
  3. overlap
  4. repel
Question 6 Multiple Choice (Single Answer)

The boiling temperature of water is much higher than methane because water molecules are:

  1. composed of fewer atoms
  2. more massive
  3. smaller
  4. polar
Question 7 Multiple Choice (Single Answer)

Are there hydrogen bonds between water molecules in the liquid phase?

  1. No, and if there were, the water would just be ice (a solid)
  2. Yes, and they are continually breaking and reforming
  3. Yes, but they rarely occur
  4. No, otherwise the water molecules would not be able to tumble over one another
Question 8 Multiple Choice (Single Answer)

Detergents differ from soaps in that:

  1. their ionically charged heads are derivatives of sulfur
  2. they can be broken down by microorganisms
  3. detergents are human-made while soaps are produced naturally
  4. detergents are less able to penetrate grease than soaps
Question 9 Multiple Choice (Single Answer)

A pH of 7 signifies a solution which is:

  1. basic
  2. salt
  3. acidic
  4. neutral
Question 10 Multiple Choice (Single Answer)

How many different isomers are possible for a hydrocarbon with the molecular formula C4H10?

  1. 1
  2. 2
  3. 3
  4. 5
Question 11 Multiple Choice (Single Answer)

Which of these contains the carbonyl group?

  1. Ketones
  2. Aldehydes
  3. Esters
  4. All of the above
Question 12 Multiple Choice (Single Answer)

What is the output of the following: StringBuffer sb1 = new StringBuffer("Amit"); StringBuffer sb2= new StringBuffer("Amit"); String ss1 = "Amit"; System.out.println(sb1==sb2); System.out.println(sb1.equals(sb2)); System.out.println(sb1.equals(ss1)); System.out.println("Poddar".substring(3));

  1. false false false dar
  2. false true false dar
  3. true true false dar
  4. compile-time error
Question 13 Multiple Choice (Single Answer)

What is the output of following code: String s1 = new String("java"); String s2 = s1.replace('a','i'); s1.concat("Fundamentals"); System.out.println(s1); System.out.println((s1+s2).charAt(5));

  1. javaFundamentals u
  2. jivi i
  3. java i
  4. jiviFundamentals u
  5. compile-time error
Question 14 Multiple Choice (Single Answer)

What will be the result of compiling and running the given program? Select one correct answer. 1 public class exception 2 { 3 public static void main(String args[]) 4 { 5 System.out.println("A"); 6 try 7 { 8 System.out.println("B"); 9 System.exit(0); 9 } 10 catch(Exception e) 11 { 12 System.out.println("C"); 13 } 14 finally 15 { 16 System.out.println("D"); 17 } 18 } 19 }

  1. Program compiles correctly and prints "A" and "C" when executed
  2. Program compiles correctly and prints "A" when executed
  3. Program compiles correctly and prints "A","B" and "C" when executed
  4. Program compiles correctly and prints "A" and "B" when executed
  5. compile-time error
  6. run-time error
Question 15 Multiple Choice (Single Answer)

Given the following: class MyThread extends Thread{ public static void main(String [] args){ MyThread t=new MyThread(); Thread x=new Thread(t); x.start(); public void run(){ for(int i=0;i<3;++i) System.out.print(i+”..”); } } } what is the result of above code?

  1. compile-time error
  2. run-time error
  3. 0..1..2..
  4. 0..1..2..3..
  5. 1..2..3..
Question 16 Multiple Choice (Single Answer)

What is the output of following? public class Test { public static void main(String[] args) { new Test(); } public Test() { PrintChar printA = new PrintChar('a', 4); PrintChar printB = new PrintChar('b', 4); printA.run(); printB.run(); } class PrintChar implements Runnable { private char charToPrint; private int times; public PrintChar(char c, int t) { charToPrint = c; times = t; } public void run() { for (int i = 0; i < times; i++) System.out.print(charToPrint); } } }

  1. run-time error
  2. aabbaabb
  3. bbbbaaaa
  4. abababab
  5. aaaabbbb
Question 17 Multiple Choice (Single Answer)

Which of the following lines will compile without warning or error:

  1. float f = 1.3;
  2. byte b = 257;
  3. int i = 10;
  4. boolean b = null;
  5. char c = "a";
Question 18 Multiple Choice (Single Answer)

Which of the following is not a keyword or reserved word in Java?

  1. if
  2. then
  3. else
  4. for
  5. while
Question 19 Multiple Choice (Multiple Answers)

Compared to the mass of a hydrogen atom, the mass of an oxygen atom is _____ times greater

  1. 8
  2. 12
  3. 16
  4. 32
Question 20 Multiple Choice (Multiple Answers)

If two protons are removed from an oxygen nucleus, the result is:

  1. carbon
  2. nitrogen
  3. Helium
  4. Hydrogen