JAVA - J2EE Training Guide

Are You Looking For JAVA/J2EE Online Training ?

Fill in your details in below form, we will get back to you

Powered by Blogger.

Thursday 13 November 2014

Easy Questions on Core Java
  • 1. What is the Important feature of Java ?
Java is a platform independent language.
  • 2. What is mean by platform independence ?
Platform independence means that we can write and compile the java code in one platform (eg Windows) and can execute the class in any other supported platform eg (Linux,Solaris,etc).
  • 3. Define JVM ?
JVM is Java Virtual Machine which is a run time environment for the compiled java class files.
  • 4. IS JVM\'s platform independent ?
 JVM\'s are not platform independent. JVM\'s are platform specific run time implementation provided by the vendor.
  • 5. Explain the principle of Encapsulation ?
Encapsulation is a process of binding or wrapping the data and the codes that operates on the data into a single entity. This keeps the data safe from outside interface and misuse. One way to think about encapsulation is as a protective wrapper that prevents code and data from being arbitrarily accessed by other code defined outside the wrapper.
  • 6. Explain the principle Inheritance ?
Inheritance is the process by which one object acquires the properties of another object.
  • 7. Explain Polymorphism principle ?
The meaning of Polymorphism is something like one name many forms. Polymorphism enables one entity to be used as as general category for different types of actions. The specific action is determined by the exact nature of the situation. The concept of polymorphism can be explained as \'one interface, multiple methods\'.
From a practical programming viewpoint, polymorphism exists in three distinct forms in Java:
                    * Method overloading
                    * Method overriding through inheritance
                    * Method overriding through the Java interface
  • 8. Define an abstract method ?
An abstract method is a method that don\'t have a body. It is declared with modifier abstract.
  • 10. What are local variables ?
Local varaiables are those which are declared within a block of code like methods. Local variables should be initialised before accessing them.
  • 11. What is the use of packages in java ?
Packages are a way to organize files in java when a project consists of more than one module. It helps in resolving name conflicts when different modules have classes with the same names.
  • 12. What is serialization ?
Serialization is the process of saving the state of an object.
  • 13. What is de-serialization ?
De-serialization is the process of restoring the state of an object.
  • 14. What is Externalizable ?
It is an interface that extends Serializable. It is having two different methods writeExternal() and readExternal. This interface allows us to customize the output.
  • 15. Define an Abstract class ?
An abstract class is an incomplete class. It is declared with the modifier abstract. We cannot create objects of the abstract class. It is used to specify a common behavioral protocol for all its child classes.
  • 16. What are instance variables ?
Instance variables are those which are defined at the class level. Instance variables need not be initialized before using them as they are automatically initialized to their default values.
  • 17. Define a package ?
Package is a collection of related classes and interfaces. package declaration should be first statement in a java class.
  • 18. What are the access modifiers available in Java ?
Access modifier specify where a method or attribute can be used. Public is accessible from anywhere. Protected is accessible from the same class and its sub classes. Package/Default are accessible from the same package. Private is only accessible from within the class.
  • 19. What is the difference between thread and process ?
A process runs in its own address space. No two processes share their address space. Threads will run in the same address space of the process that owns them.
  • 20. What is a garbage collection ?
Garbage collection is the process of releasing memory used by unreferenced objects. It relieves the programmer from the process of manually releasing the memory used by objects .
  • 21. What is the importance of a static variable ?
Static variables are class level variables where all objects of the class refer to the same variable. If one object changes the value then the change gets reflected in all the objects.
  • 22. What is Use of Abstract Class ?
 A Class which doesn't  provide complete implementation is defined as an abstract class. Abstract classes enforce abstraction.
  • 23. Can abstract class be declared as final ?
Not possible. An abstract class without being inherited is of no use and hence will result in compile time error.
  • 24. What is the use of a abstract variable ?
Variables can't be declared as abstract. only classes and methods can be declared as abstract.
  • 24. Define Multi-threading ?
Multi-threading is the scenario where more than one threads are running.
  • 25. Define deadlock ?
Deadlock is a situation when two threads are waiting on each other to release a resource. Each thread waiting for a resource which is held by the other waiting thread.
  • 26. Define the Local object ?
A Local object represents a specific geographical, political, or cultural region
  • 27. What is anonymous class ?
An anonymous class is a type of inner class that don’t have any name.
  • 28. What is class path ?
Class path is the path where Java looks for loading class at run time and compile time.
  • 29. What is path ?
It is an the location where the OS will look for finding out the executable files and commands.
  • 30. Why does Java not support operator overloading ?
Operator overloading makes the code very difficult to read and maintain. To maintain code simplicity, Java doesn't support operator overloading.

Java is a popular programming language originally developed at Sun Microsystems, to develop the source code for software programs. The language is usually employed in developing web application programs and is coded according to client specifications.

Role of Java Developer

Based on the specifications mentioned in the software development life cycle or as per directions, the Java developer may be involved in developing a specific part of source code or the whole project. Once the development process is complete, the software is tested for errors or bugs following which it will be updated with the whole software project. However, a final review is needed before release.
So as to become an expert programmer, the aspirant should possess adequate analytical and logical skills and be well versed with technical aspects of object oriented programming, data base management etc. Ability to develop the algorithm, describing the flow of the software program is essential. Additionally, interpersonal and managerial skills play a lead role in doing well as a Java developer.

Java Career Opportunities

A professional computer science degree holder or one with diploma in software development pursuing strong knowledge and skills in Java programming can take up Java Developer as a career.
The demand for the java professionals has increased tremendously and is further expected to grow exponentially, basically due to java's cross platform for network computing from server to cell phones smart cards.
  • Java Developers work closely with clients to achieve desired interactivity in websites and web applications while maintaining a user-friendly website.
  • Design, implement and maintain java application phases.
  • Drive best practice, quality and consistency within design and development phases.
  • Utilize and contribute to Creditex strategic codebase to design projects.
  • Identify production and non-production application issues.
  • Identify opportunities to fine-tune and optimize applications of java developed projects.
  • Provide technical support and consultation for java application and infrastructure questions.
  • Mentor and coach development team.
  • Provide direct support to Development Manager efforts as requested.
  • Establish, refine and integrate development and test environment tools and software as needed.
  • Recommend changes to improve established java application processes.
  • Develop technical designs for application development.
  • Develop application code for java programs.
Learn more about JAVA
Specifically designed to have as few implementation dependencies as possible, Java is a concurrent, class-based and object-oriented computer programming language that is released in 1995 as a core component of Sun Microsystems' Java platform. It is developed by James Gosling and allows application developers to "write once, run anywhere" (WORA), meaning that code that runs on one platform does not need to be recompiled to run on another.
Typically compiled to bytecode, Java applications can run on any Java virtual machine (JVM) irrespective of computer architecture. Though the language derives much of its syntax from C and C++, it has fewer low-level facilities than either of them.
Initially named as Oak after an oak tree that stood outside Gosling's office, the language was later renamed as ‘Green’ followed by ‘Java’ taken from Java coffee. The reason behind choosing the name is consumption of Java coffee in large quantities by its creators during the development process.
 Five primary goals in the creation of the Java language is to keep it
  1. "simple, object-oriented and familiar"
  2. "robust and secure"
  3. "architecture-neutral and portable"
  4. "high performance"
  5. "interpreted, threaded, and dynamic
Hard Questions on Java Script
  • 1. What is the use of Math Object in Java Script ?
The math object provides you properties and methods for mathematical constants and functions.
  • 2. What’s relationship between Java Script and ECMA Script ?
ECMAScript is yet another name for JavaScript (other names include Live Script). The current JavaScript that you see supported in browsers is ECMAScript revision 3.
  • 3. Are JavaScript and J Query different ?
 J Query is a quick as well as concise JavaScript Library that simplifies HTML document traversing, animating, event handling, & Ajax interactions for the purpose of quick web development needs. So although they are not entirely different, both are not the same either.
  • 4. Explain the strict mode in Java Script ?
  The strict mode ensures that if functions are not properly thought it, those are disabled. It also kept a check on potentially unsafe actions and throw errors when it happens.
  • 5. Explain Java Script closures ?
A basic overview of  JavaScript closures is that it is a stack-frame which is not de-allocated when the function returns.
  • 6. What is Java script namespacing? How and where is it used ?
 Using global variables in Java Script is evil and a bad practice. That being said, namespacing is used to bundle up all your functionality using a unique name. In JavaScript, a namespace is really just an object that you’ve attached all further methods, properties and objects. It promotes modularity and code reuse in the application.

  • 7. How to read and write a file using Java Script ?
 I/O operations like reading or writing a file is not possible with client-side Java Script. However , this can be done by coding a Java applet that reads files for the script.
  • 8. What can JavaScript programs do ?
 Generation of HTML pages on-the-fly without accessing the Web server. The user can be given control over the browser like User input validation Simple computations can be performed on the client\\\'s machine The user\\\'s browser, OS, screen size, etc. can be detected Date and Time Handling.
  • 9. How to set a HTML document\\\'s background color ?
 document.bgcolor property can be set to any appropriate color.
  • 10. What does is NaN function do ?
 Return true if the argument is not a number.
  • 11. Is a Java Script script faster than an ASP Script ?
Yes.Since javascript is a client-side script it does require the web server\\\'s help for its computation,so it is always faster than any server-side script like ASP,PHP, etc.
  • 12. Are Java and JavaScript the Same ?
 No.java and javascript are two different languages.
    Java is a powerful object - oriented programming language like C++,C whereas Javascript is a client-side     scripting language with some limitations.
  • 13. How to embed Java Script in a web page ?
 JavaScript code can be embedded in a web page betweentags.
  • 14. How to get the contents of an input box using Java Script ?
 Use the \\\'value\\\' property.
      var myValue = window.document.getElementById(\\\'MyTextBox\\\').value;

  • 15. How to determine the state of a Check box using JavaScript ?
 var checkedP = window.document.getElementById(\\\'myCheckBox\\\').checked;
  • 16. What is the difference between Client side JavaScript and Server side JavaScript ?
 Client side java script comprises the basic language and predefined objects which are relevant to running java script in a browser. The client side java script is embedded directly by in the HTML pages.
  • 17. How to inheritance works in Java Script ?
 Java Script has a somewhat unique inheritance model and a good understanding of it is crucial to using Java Script in larger applications, Kubasik says.  “We are looking for the applicant to discuss not only prototypes, and how that affects inheritance, but in what ways this can be more flexible than classical inheritance models seen in Java and C#.”
  • 18. Where are cookies actually stored on the hard disk ?
The storage of cookies on the hard disk depends on OS and the browser. The Netscape navigator on Windows, the file cookies.txt contains all the cookies.
  • 19. What is the undefined value ?
 Undefined value: A value that is not defined and has no keyword is known as undefined value. For example in the declaration, int number; the number has undefined value.
  • 20. How to set the cursor to wait in Java Script ?
The cursor can set to wait in JavaScript by using the property ‘cursor’ property. The following example illustrates the usage.
  • 21. What are windows object and navigator object in Java Script ?
Windows object is top level object in Java script. It contains several other objects such as, document, history, location, name, menu bar etc., in itself. Window object is the global object for Java script that is written at client-side.
  • 22. How to detect the operating system on the client machine in Java Script ?
 The navigator.appVersion string should be used to find the name of the operating system on the client machine.
  • 23. How to set a HTML document\\\'s background color in Java Script ?
Using document object the back ground color can be changed by JavaScript.
  • 24. What are undefined and undeclared variables ?
 Undeclared variables are those that are not declared in the program (do not exist at all),trying to read their values gives runtime error.But if undeclared variables are assigned then implicit declaration is done .
         Undefined variables are those that are not assigned any value but are declared in the program.Trying to read such variables gives special value called undefined value.
  • 25. What is the difference between an Alert box and a Confirmation box ?
  An alert box displays only one button which is the OK button whereas the Confirm box displays two buttons namely OK and cancel.
Easy Question on Java Script
  • 1. What is JavaScript ?
JavaScript is a scripting language most often used for client-side web development.
  • 2. What is the difference between JavaScript and Jscript ?
Both JavaScript and Jscript are almost similar. JavaScript was developed by Netscape. Microsoft reverse engineered Javascript and called it JScript.
  • 3. What are the various datatypes in javascript ?
  They are
        1) Number
         2) String
         3) Boolean
         4) Function
         5) Object
         6) Null
         7) Undefined
  • 4. What is this keyword ?
 It refers to the current object.
  • 5. How many looping structures can you find in javascript ?
 If you are a programmer, you know the use of loops. It is used to run a piece of code multiple times according to some particular condition. Javascript being a popular scripting language supports the following loops
                                                       a) for
                                                        b)while
                                                        c)do-while loop
  • 6. What is negative infinity ?
It’s a number in JavaScript, derived by dividing negative number by zero.
  • 7. What is the data type of variables of in JavaScript ?
  All variables are of object type in JavaScript.
  • 8. What is the difference between SessionState and ViewState ?
 View State is specific to a page in a session. Session state refers to user specific data that can be accessed across all pages in the web application.
  • 9. How to Accessing Elements using java script ?
The elements of JavaScript are accessed by their names. By default the browser is accessed by the element ‘windows’ and the page by ‘document’. The corresponding element has user defined names for forms and its elements.
  • 10. What looping structures are there in Java Script ?
 for, while, do-while loops.
  • 11. What does Java Script null mean ?
 The null value is a unique value representing no value or no object.
          It implies no object,or null string,no valid boolean value,no number and no array    object.

  • 12. What does undefined value mean in Java Script ?
 Undefined value means the variable used in the code doesn\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'t exist or is not assigned any value or the property doesn\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'t exist.
  • 13. Does Java Script have the concept level scope ?
  No. JavaScript does not have block level scope, all the variables declared inside a function possess the same level of scope unlike c,c++,java.
  • 14. What is the difference between an alert box and a confirmation box ?
  An alert box displays only one button which is the OK button whereas the Confirm box displays two buttons namely OK and cancel.
  • 15. What is a prompt box ?
 A prompt box allows the user to enter input by providing a text box.
  • 16. What are Boolean operators does Java Script support ?
 &&, and !
  • 17. What does Java Script null mean ?
he null value is a unique value representing no value or no object.
         It implies no object,or null string,no valid Boolean value,no number and no array object.
Hard Questions on Core Java
  • 1. What is the main difference between a JDK and a JVM ?
JDK is Java Development Kit which is for development purpose and it includes execution environment also. But JVM is purely a run time environment and hence you will not be able to compile your source files using a JVM.
  • 2. What is a pointer and how does Java support Pointers ?
Pointer is a reference handle to a memory location. Improper handling of pointers leads to memory leaks and reliability issues hence Java doesn\'t support the usage of pointers.
  • 3. What is the main difference between private, protected, and public ?
These keywords are for allowing privileges to components such as java methods and variables.
Public: accessible to all classes.
Private: accessible only to the class to which they belong.
Protected: accessible to the class to which they belong and any subclasses.
Access specifiers are keywords that determines the type of access to the member of a class. These are:
                       * Public
                       * Protected
                       * Private
                        * Default
  • 4. What\'s the difference between a Vector and an Array List ?
Java Vector class is internally synchronized and Array List is not synchronized.
  • 5. Is Iterator a Class or Interface? What is its use ?
Iterator is an interface which is used to step through the elements of a Collection.
  • 6. What are Java transient variables ?
Transient variables are variable that cannot be serialized.
  • 7. Define Synchronization ?
Synchronization is the ability to control the access of multiple threads to shared resources. Synchronization stops Multithreading. With synchronization , at  a time only one thread will be able to access a shared resource.
  • 8. How can you force garbage collection in java ?
You cannot force Garbage Collection, but you can request for it by calling the method System.gc().  But it doesn't mean that Garbage Collection will start immediately. The garbage collection is a low priority thread of JVM.
  • 9. Does garbage collection guarantee that a program will not run out of memory ?
Garbage collection does not guarantee that a program will not run out of memory. It is also possible for programs to create objects that are not subject to garbage collection. And there is no guarantee that Garbage Collection thread will be executed.
  • 10. What must a class do to implement an interface ?
It must identify the interface in its implements clause. Also it must provide definition for all the methods in the interface otherwise it must be declared abstract.
  • 11. Why java is said as pass-by-value ?
When assigning an object to a variable, we are actually assigning the memory address of that object to the variable. So the value passed is actually the memory location of the object. This results in object aliasing, meaning you can have many variables referring to the same object on the heap.
  • 12. What is a object cloning ?
It is the process of duplicating an object so that two identical objects will exist in the memory at the same time.
  • 13. Define object pooling ?
Creating a large number of identical short lived objects is called object pooling. This helps to minimize the need of garbage collection and makes the memory use more effective.
  • 14. What are the disadvantage of garbage collection ?
It adds an overhead that can affect performance. Additionally there is no guarantee that the object will be garbage collected.
  • 15. Why Java is not fully objective oriented ?
Due to the use of primitives in java, which are not objects.
  • 16. What is marker interface ?
An interface that contains no methods. Eg: Serializable, Cloneable, SingleThreadModel etc. It is used to just mark java classes that support certain capability.
  • 17. What are tag interfaces ?
Tag interface is an alternate name for marker interface.
  • 18. What are the restrictions placed on static method ?
We cannot override static methods. We cannot access any object variables inside static method. Also the this reference also not available in static methods.
  • 19. Can we declare a static variable inside a method ?
Static Variables are class level variables and they can't be declared inside a method. If declared, the class will not compile.
  • 20. Can any Interface implement another Interface ?
Interfaces doesn't provide implementation hence a interface cannot implement another interface.
  • 21. Can any Interface extend another Interface ?
Yes an Interface can inherit another Interface, for that matter an Interface can extend more than one Interface.
  • 22. Can Class extend more than one Class ?
Not possible. A Class can extend only one class but can implement any number of Interfaces.
  • 23. What is the main difference between Iterator and Enumeration ?
Iterator differ from enumeration in two ways Iterator allow the caller to remove elements from the underlying collection during the iteration with well-defined semantics. And , method names have been improved.
  • 24. What is internationalization ?
Internationalization is the process of designing an application so that it can be adapted to various languages and regions without changes.
  • 25. What is the difference between URL and URL Connection ?
A URL represents the location of a resource, and a URL Connection represents a link for accessing or communicating with the resource at the location.
Name: abcd                                                     E-mail ID: abc@gmail.com
Ph No.: xxxxxxxxxxxxxxx                  Current Job: Senior mobile developer at abc, Washington DC

SUMMARY
Background in creating complex mobile applications for IPhone and Android. Can work independently and respect a deadline. Comfortable working with a good team of developers. passionate about the mobile marketing.

OBJECTIVE

Obtain a job in a reputable mobile application company that can identify my knowledge. I am a key guy that has the ability to work alone, or lead a team when the need arises.
STRENGTHS
    1. Strong knowledge in JavaScript, Ajax and JQuery Mobile.
    2. Familiar with most popular operating systems: Linux, Windows and mac OS.JavaScript, Ajax and Java experience in developing applications
    3. Photoshop, Adobe Acrobat, Final Cut Pro, XCode, XML, FileMaker, Illustrator.
    4. Good communication skills, and ability to work in a team.
    5. Applications for Ipad, Android tablets and mobiles.
    6. Mobile marketing and advertising experience.
    7. Mobile commerce.
    8. Mobile wallet.
    9. Mobile Banking and payments.
    10. Revenue optimization.
EXPERIENCE
Team leader and Mobile developer                                       November 2008 – Present
Company Name                                                                                   Irockapplications, Washington DC
Responsibilities:
  • Optimize the application and gain more revenue.
  • Maintain and repair any bugs found.
  • Create new application plans, graphics and coding.
  • Code applications for IPhone and Android market
  • Lead the team to build modern applications and games
  • Analyze the smart phones market
Mobile Marketing Manager
OurApps Inc., Washington DC
June 2005 – November 2008 ( 3 years and 5 months )
Responsibilities:
  • Lead the company to higher revenue
  • Maintain the website on top of the market by launching useful utilities and games
  • Study new opportunities for mobile applications
  • Key member of the design and coding team
  • Produced a wide variety of applications that were sold to over 10.000 clients.
Junior Mobile Applications
IloveApps Inc, Washington DC
July 2003 – June 2005 ( 1 year and 11 months )
Responsibilities:
  • Study the mobile market and find new opportunities
  • Full support for clients
  • Code basic applications
EDUCATION
University in XYZ – Master degree
2001 – 2005
Specialty: IT

University in XYZ – License degree
1998 – 2001
Specialty: Economical IT

Fremont Unified XYZ – School
1994 – 1998
Specialty: Mathematics

COURSES
Android application programming by Jan Borchers
Aachen University
2010

Developing Apps for iOS
St. Louis University
2008

Developing Mobile application by Web Technologies
Stanford University
2007

Application development
Stanford University
2005