JavaRush /Java Blog /Random-KO /๋ฒจ๋กœ๋ฃจ์‹œ์˜ ๋Œ€๊ทœ๋ชจ IT ํšŒ์‚ฌ ์ค‘ ํ•˜๋‚˜์— ๋Œ€ํ•œ ํ…Œ์ŠคํŠธ ๊ณผ์ œ
Alena
๋ ˆ๋ฒจ 35
ะœะธะฝัะบ

๋ฒจ๋กœ๋ฃจ์‹œ์˜ ๋Œ€๊ทœ๋ชจ IT ํšŒ์‚ฌ ์ค‘ ํ•˜๋‚˜์— ๋Œ€ํ•œ ํ…Œ์ŠคํŠธ ๊ณผ์ œ

Random-KO ๊ทธ๋ฃน์— ๊ฒŒ์‹œ๋˜์—ˆ์Šต๋‹ˆ๋‹ค
์•ˆ๋…•ํ•˜์„ธ์š” ์—ฌ๋Ÿฌ๋ถ„! ์ง€๋‚œ ๊ธ€ ์˜ ํ•ด์„ค์—์„œ ์•ฝ์†๋“œ๋ฆฐ ๋Œ€๋กœ , ์ธํ„ด์‹ญ ๋“ฑ๋ก์„ ์œ„ํ•ด ์ €์—๊ฒŒ ๋ณด๋‚ด์ฃผ์‹  J2SE, JavaEE ํ…Œ์ŠคํŠธ ๊ณผ์ œ๋ฅผ ๊ฒŒ์‹œํ•ฉ๋‹ˆ๋‹ค. ์™„๋ฃŒํ•˜๋Š” ๋ฐ 30๋ถ„์ด ์ฃผ์–ด์ง‘๋‹ˆ๋‹ค. ์‚ฌ์‹ค, ์ €๋Š” 14๋ฌธ์ œ ์ค‘ 12๋ฌธ์ œ๋ฅผ ๊ตฌํ–ˆ์Šต๋‹ˆ๋‹ค. - ์—ฌ๋Ÿฌ ๊ฐ€์ง€ ๋‹ต๋ณ€ ์˜ต์…˜์ด ์žˆ์„ ์ˆ˜ ์žˆ์Œ์„ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค. * ๋‹ต๋ณ€ ์˜ต์…˜์ด ํ•˜๋‚˜๋งŒ ์žˆ์„ ์ˆ˜ ์žˆ์Œ์„ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค.
  1. ์งˆ๋ฌธ
  2. Integer a = new Integer(2); Integer b = new Integer(2); What code will provide output: "false"? Check all that apply. ะ’ะฐั€ะธะฐะฝั‚ั‹ ะพั‚ะฒะตั‚ะพะฒ: - System.out.println(a.intValue() == b.intValue()); - System.out.println(a.compareTo(b)); - System.out.println(a.equals(b)); - System.out.println(a == b);
  3. ์งˆ๋ฌธ
  4. Which HTTP methods are NOT considered idempotent (multiple execution of query will give the same result)? (Choose all that apply) ะ’ะฐั€ะธะฐะฝั‚ั‹ ะพั‚ะฒะตั‚ะพะฒ: - GET - POST - HEAD - PUT
  5. ์งˆ๋ฌธ
  6. How should servlet developers handle the HttpServlet's service() method when extending HttpServlet? (Choose all that apply). ะ’ะฐั€ะธะฐะฝั‚ั‹ ะพั‚ะฒะตั‚ะพะฒ: - They should override the service() method in most cases. - They should call the service() method from doGet() or doPost(). - They should call the service() method from the init() method. - They should override at least one doXXX() method (such as doPost()).
  7. ์งˆ๋ฌธ
  8. Which methods are used by a servlet to handle form data from a client? (Choose all that apply) ะ’ะฐั€ะธะฐะฝั‚ั‹ ะพั‚ะฒะตั‚ะพะฒ: - HttpServlet.doHead() - HttpServlet.doPost() - HttpServlet.doForm() - ServletRequest.doGet() - ServletRequest.doPost() - ServletRequest.doForm()
  9. ์งˆ๋ฌธ
  10. Given the Product Bean: public class Product{ public Product(String title, int size){ this.title = title; this.size = size; } String title; int size; } How would servlet code from a service method (e.g. doPost()) pass a Product bean info to the jsp? ะ’ะฐั€ะธะฐะฝั‚ั‹ ะพั‚ะฒะตั‚ะพะฒ: * response.setAttribute("product", new Product("Shirt", t)); * response.setParameter("product", new Product("Shirt", t)); * request.setAttribute("product", new Product("Shirt", t)); * request.setParameter("product", new Product("Shirt", t));
  11. ์งˆ๋ฌธ
  12. You have to create your own type of exception, named UserOperationExัeption. And you need to make it a checked exัepetion. What is the appropriate signature in this case? Check all that apply. ะ’ะฐั€ะธะฐะฝั‚ั‹ ะพั‚ะฒะตั‚ะพะฒ: - public class UserOperationExัeption extends RuntimeExัeption{...} - public class UserOperationExัeption extends Exัeption{...} - public class UserOperationExัeption extends IOExัeption{...} - public class UserOperationExัeption extends extends Error{...}
  13. ์งˆ๋ฌธ
  14. Given following classes hierarchy: public class Building {...} public class Warehouse extends Building {...} public class Shop extends Building {...} public class SportsShop extends Shop {...} and code: ... Building b1 = new Building(); Building b2 = new Warehouse(); ... What code will cause a ClassCastException to be thrown? Check all that apply. ะ’ะฐั€ะธะฐะฝั‚ั‹ ะพั‚ะฒะตั‚ะพะฒ: - Warehouse w1 = b2; - Warehouse w2 = (Warehouse) b2; - Warehouse w3 = new SportsShop(); - Shop s1 = (Shop)b1; - Shop s2 = new SportsShop();
  15. ์งˆ๋ฌธ
  16. Given the method: public int shift(int value, int offset) { value += offset; return value; } What will be the output of following code: int v = 2; shift(v,5); System.out.println(v); ะ’ะฐั€ะธะฐะฝั‚ั‹ ะพั‚ะฒะตั‚ะพะฒ: * 2 * 5 * 7 * 3
  17. ์งˆ๋ฌธ
  18. Given: public class Product { public Product(String title, int size){ this.title = title; this.size = size; } String title; int size; public String toString() { return title + ":" + size; } } ... Set products = new HashSet(); products.add(new Product("Hat", 3)); products.add(new Product("Hat", 3)); System.out.println(products); What items will be in the programm output, considering that Product class inherits equals() and hashCode() methods from Object? ะ’ะฐั€ะธะฐะฝั‚ั‹ ะพั‚ะฒะตั‚ะพะฒ: * Hat * [Hat:3, Hat:3] * [Hat:3] * RuntimeException about duplicate elements
  19. ์งˆ๋ฌธ
  20. What code is valid for creating immutable list? ะ’ะฐั€ะธะฐะฝั‚ั‹ ะพั‚ะฒะตั‚ะพะฒ: * List immutableItems = Collections.unmodifiableList(new ArrayList()); immutableItems.add("i1"); immutableItems.add("i2"); * List items = new ArrayList(); items.add("i1); items.add("i2"); List immutableItems = Collections.unmodifiableList(items); * List items = new ArrayList(); items.add("i1); items.add("i2"); final List immutableItems = items; * List can't be immutable
  21. ์งˆ๋ฌธ
  22. What is complexity (Big 0 notation) of ArrayList contains() method? ะ’ะฐั€ะธะฐะฝั‚ั‹ ะพั‚ะฒะตั‚ะพะฒ: * 0(n^2) * 0(log(n)) * 0(n) * 0(1)
  23. ์งˆ๋ฌธ
  24. Given and array of size n, suppose you need to write a program that calculates the sum of every second element of this array. What will be the complexity (Big 0 notation) of most optimal implementation of this algorithm? ะ’ะฐั€ะธะฐะฝั‚ั‹ ะพั‚ะฒะตั‚ะพะฒ: * 0(n^2) * 0(n/2) * 0(n) * 0(1)
์–ด๋–ค ๋‹ต๋ณ€ ์˜ต์…˜์ด ์˜ฌ๋ฐ”๋ฅธ์ง€ ๋…ผ์˜ํ•  ๊ฒƒ์„ ์ œ์•ˆํ•ฉ๋‹ˆ๋‹ค.
์ฝ”๋ฉ˜ํŠธ
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION