Interview Questions and Answers for 'Symantec' - 48 question(s) found - Order By Newest Q1. Explain OOPs
or
Explain OOPs Principles
or
Explain OOPs Concepts
or
Explain OOPs features
or
Tell me something about OOPs Core Java
Ans. OOPs or Object Oriented Programming is a Programming model which is organized around Objects instead of processes. Instead of a process calling series of processes, this model stresses on communication between objects. Objects that all self sustained, provide security by encapsulating it's members and providing abstracted interfaces over the functions it performs. OOP's facilitate the following features
1. Inheritance for Code Reuse
2. Abstraction for modularity, maintenance and agility
3. Encapsulation for security and protection
4. Polymorphism for flexibility and interfacing Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  oops  oops features Asked in 260 Companies basic   frequent Q2. Which are the different segments of memory ? Core Java
Ans. 1. Stack Segment - Contains primitives, Class / Interface names and references.
2. Heap Segment - Contains all created objects in runtime, objects only plus their object attributes (instance variables), Static variables are also stored in heap.
3. Code Segment - The segment where the actual compiled Java bytecodes resides when loaded Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  java   memory   memory management   stack memory   heap memory   code segment memory   advanced Asked in 9 Companies expert   frequent Try 6 Question(s) TestAdvanced level question usually asked in High end product companies. Have been asked in Google and Amazon (Based on 1 Feedback) Q3. Describe, in general, how java's garbage collector works ? Core Java
Ans. The Java runtime environment deletes objects when it determines that they are no longer being used. This process is known as garbage collection. The Java runtime environment supports a garbage collector that periodically frees the memory used by objects that are no longer needed. The Java garbage collector is a mark-sweep garbage collector that scans Java dynamic memory areas for objects, marking those that are referenced. After all possible paths to objects are investigated, those objects that are not marked (i.e. are not referenced) are known to be garbage and are collected. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  java   garbage collection   java memory management   advanced Asked in 21 Companies intermediate   frequent Try 4 Question(s) TestVery frequently asked.Usually among first few questions. Ans. MVC is a Design Pattern that facilititates loose coupling by segregating responsibilities in a Web application
1. Controller receives the requests and handles overall control of the request
2. Model holds majority of the Business logic, and
3. View comprise of the view objects and GUI component Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  j2ee   mvc   mvc design pattern   design pattern   struts   spring   web application   web frameworks   ebay Asked in 60 Companies basic   frequent Try 1 Question(s) TestFrequently asked to experienced developers. Recently asked in many US interviews. Q5. What is database deadlock ? How can we avoid them? Database
Ans. When multiple external resources are trying to access the DB locks and runs into cyclic wait, it may makes the DB unresponsive.
Deadlock can be avoided using variety of measures, Few listed below -
Can make a queue wherein we can verify and order the request to DB.
Less use of cursors as they lock the tables for long time.
Keeping the transaction smaller. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  java   database   architecture Asked in 7 Companies expert   frequent Frequently asked question for intermediate developers. Frequently asked in HCL Technologies and EPAM. Q6. What is Volatile keyword used for ? Core Java
Ans. Volatile is a declaration that a variable can be accessed by multiple threads and hence shouldnt be cached. Sample Code for volatile Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  java   oops   synchronization   volatile   java keywords Asked in 42 Companies intermediate   frequent Try 1 Question(s) TestFrequently asked to fresh graduates. Ans. When two threads are waiting each other and cant precede the program is said to be deadlock. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  java   threads   multi threading   operating system   deadlock  concurrency Asked in 23 Companies basic   frequent Frequently asked at HCL Technologies ( Based on 3 feedback ) Q8. Difference between Checked and Unchecked exceptions ? Core Java
Ans. Checked exceptions are the exceptions for which compiler throws an errors if they are not checked whereas unchecked exceptions are caught during run time only and hence can't be checked. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  java   exceptions   checked exceptions   unchecked exceptions   exception handling   checked vs unchecked exceptions Asked in 39 Companies basic   frequent Try 1 Question(s) TestVery frequently asked. Usually difference between String,StringBuffer and StringBuilder is asked in different variations. Q9. Difference between StringBuffer and StringBuilder ? Core Java
Ans. StringBuffer is synchronized whereas StringBuilder is not. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  java   string   stringbuffer   string class   stringbuilder   synchronized   basic interview question   infosys technologies Asked in 17 Companies basic   frequent Try 1 Question(s) Test Q10. What is "super" used for ?
Ans. Used to access members of the base class. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  java   oops   java keywords   super   basic interview question Asked in 2 Companies basic   frequent Q11. How are values passed in Java ? By value or reference ? Core Java
Ans. Java only provides pass by value. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  ebay   pass by value   pass by reference   method call   methods   functions   function call Asked in 10 Companies basic   frequent Ans. == compares values === is used in scripting languages for comparing two values as well as there data tpe. like in js,php. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  ==  ===  == vs === Asked in 13 Companies basic   frequent Q13. What are the types of authentication used in Web services ? Web Service
Ans. Encrypted User Name / Password
Encrypted Password within Cookie
Encrypted Tokens
IP
Client Certificates
Oauth Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  authentication  security  web service Asked in 12 Companies basic   frequent Q14. Have you ever heard about csrf attacks ? Security
Ans. Yes, Cross-Site Request Forgery (CSRF) is an attack that forces an end user to execute unwanted actions on a web application in which they're currently authenticated. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  csrf attack  Cross-Site Request Forgery (CSRF) Asked in 16 Companies Q15. Write a program to print the index of the first non repeated character in a java string Core Java
Ans. public class BuggyBread1{
public static void main (String args[]) {
String str = "hheello world";
char[] charArray = str.toCharArray();
char selectedChar = 'a';
for(char char1: charArray){
if(!str.contains(Character.toString(char1).concat(Character.toString(char1)))){
selectedChar = char1;
break;
}
}
System.out.println(str.indexOf(Character.toString(selectedChar)));
}
} Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  string  code  coding Asked in 9 Companies Q16. What Parameter we need to specify while creating sockets ?
This question was recently asked at 'Symantec'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q17. how is the internal code for the "volatile" implemented ? Core Java
This question was recently asked at 'Symantec'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  volatile Asked in 1 Companies Q18. Design database schema for Facebook like application. Database
This question was recently asked at 'Symantec'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  database design Asked in 1 Companies expert Q19. How Bitly shortens the URL ? Web
This question was recently asked at 'Symantec'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  web application   url Asked in 1 Companies   rare Q20. Write Java code that would cause deadlock ? Core Java
Ans. https://howtodoinjava.com/java/multi-threading/writing-a-deadlock-and-resolving-in-java/ Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  multithreading  threads  deadlock Asked in 1 Companies intermediate Q21. How would you design a Thread Pool ? Design
Ans. By using Executor Framework , we can create Thread pool Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  Thread Pool Asked in 1 Companies expert Q22. Suppose you have 8 balls, one of them is either have more/less weight, In how many least possible iterations would you find that ball? Design
This question was recently asked at 'Symantec'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  puzzle  design Asked in 1 Companies Q23. Can you name few Java packages which you frequently used ? Core Java
This question was recently asked at 'Symantec'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q24. Can you tell something about Web security ? Web
This question was recently asked at 'Symantec'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  web security Asked in 1 Companies Q25. If we have width of an html element as 100px and a border of 10 px. What will be the effective width of the element ? Will the border start after 100 px or after 90 px ? Html
This question was recently asked at 'Symantec'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q26. Can you create html and css for a rectangular shape button with width 10px. CSS
This question was recently asked at 'Symantec'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q27. What is the difference between Java OR operator and Java script OR operator ? JavaScript
This question was recently asked at 'Symantec'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q28. What are the advantages of using cascade style sheets or css ? CSS
Ans. We can enforce consistent UI and can have single point of change for UI components.' Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Ans. Possible Answer - I use either Firebug or Chrome Developer tool. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q30. Have you ever worked with Firebug ? Browser
Ans. Possible Answer - Yes, for debugging Javascript issues and fixing CSS and Html. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies