0% found this document useful (0 votes)
226 views2 pages

Interviu Thales

The interview lasted 3 days and was difficult. Technical questions included coding snippets, threading concepts, collections, sorting algorithms, and XML/properties files. Questions covered frameworks like JAXB, Producer-Consumer problem implementation using BlockingQueue, default interface methods, protected access for subclasses, valid interface method signatures, switch statements, thread states, and socket I/O.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
226 views2 pages

Interviu Thales

The interview lasted 3 days and was difficult. Technical questions included coding snippets, threading concepts, collections, sorting algorithms, and XML/properties files. Questions covered frameworks like JAXB, Producer-Consumer problem implementation using BlockingQueue, default interface methods, protected access for subclasses, valid interface method signatures, switch statements, thread states, and socket I/O.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

Am fost la interviu în Septembrie 2019, în Bucuresti

Durata interviu: 3 zile


Dificultate interviu: Dificil

Cum a decurs interviul?


Intrebari tehnice tip grila. Bucati de cod sa spun ce returneaza.

Întrebări și teste la interviu?


- What can Locale be used in Java?
- How to declare a thread class by implementing Runnable.
- What is the name of Collection interface used to maintain unique values? (Set)
- What is the sorting algorithm used by Arrays.sort() ? (Quicksort)
- Which is the correct way to start a new Thread? (Answer: Create a new Thread
object and call the method start().)
- Which 3 statements concerning the use of the java.io.Serializable interface are
true:
a) Object from classes that use aggregation cannot be serialized.
b) An object serialized on one JVM can be successfully deserialized on a different
JVM.
c) The values in fields with volatile modifier will NOT survive serializations and
deserialization.
d) The values in fields with transient modifier will NOT survive serialization and
deserialization.
e) Serializable interface is a marker interface.
--------------------------------
-Which framework can be used for XML data binding in Java?
a) XSLT (*)
b) JAXB
c) SAX
-----------------------------------
- What do I need to read a properties file in Java?
a) DOM
b) XSD
c) Properties class (*)
----------------------------
- Any class that implements Runnable interface has to provide the implementation
for the following methods:
public void start();
public void run(); (*)

a) True
b) False (*)
----------------------------------
Which Java building block would you use to implement Producer-Consumer problem?
a) Observer / Observable
b) wait / notify
c) BlockingQueue
--------------------------------------------
How can I provide a method implementation in a Java interface?
a) Methods of a Java interface are implicitly abstract and cannot have
implementations
b) By using “default” methods (*)
c) By extending a class that already provides the method implementation
----------------------------------
You want subclasses in any package to have access to members of a superclass. Which
is the most restrictive access that accomplishes this objective?
a) public
b) private
c) protected (*)
d) transient
e) default
-------------------------------------
-Which of the following are valid method signatures in an interface?
1. private int getArea();
2. public float getVol(float x);
3. protected void main(String args);
4. public static void main(String args);
5. Boolean setFlag(Boolean () test);
-----------------------------------------------------
-Given the following code:
switch (x) {
default:
System.out.println(“Hello”);
}

Which two are acceptable types for x?


1. byte
2. long
3. char
4. float
5. Short
6. Long

a) 1 and 3
b) 2 and 4
c) 3 and 5
d) 4 and 6
----------------------------------
Which three guarantee that a thread will leave the running state?
1. yield()
2. wait()
3. notify()
4. notifyAll()
5. sleep(500)
6. aliveThread.join()
7. Thread.killThread()

a) 1, 2 and 4
b) 2, 5 and 6
c) 3, 4 and 7
d) 4, 5 and 7
-----------------------------
Given the following code:
public void readFromSocket() throws IOException {
final byte[] buff = new byte[1024];
Socket socket = new Socket(“localhost”, 5500);
InputStream is = socket.getInputStream();
final int res = is.read(buff);
System.out.println(“Read from socket”); // line 5
}

The line 5 of code is reached (choose all that apply):


a) is never reached
b) Does not compile
c) is reached when the input stream is closed or and I/O occurs
d) is reached when the communication partner sends data
e) is reached when the communication partner close the connection

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy