YouTube Icon

Interview Questions.

Accenture Java Placement Papers - Accenture Java Interview Questions - Jul 28, 2022

fluid

Accenture Java Placement Papers - Accenture Java Interview Questions

Q1. What Is The Difference Between Serializable And Externalizable Interfaces?

Both interfaces are used for put into effect serialization. But, the fundamental distinction is Serializable interface does now not have any technique (it’s a marker interface ) and Externalizable interface having 2 techniques including readExternal() and writeExternal(). Serializable interface is the extremely good interface for Externalizable interface.

Q2. What Is An Abstract Method?

An summary technique is a method whose implementation is deferred to a subclass.

Q3. What Modifiers May Be Used With An Inner Class That Is A Member Of An Outer Class?

A (non-local) internal class can be declared as public, included, private, static, very last, or abstract.

Q4. What Value Does Read() Return When It Has Reached The End Of A File?

The study() technique returns -1 while it has reached the end of a file.

Q5. If A Variable Is Declared As Private, Where May The Variable Be Accessed?

A personal variable might also most effective be accessed within the magnificence in which it's far declared.

Q6. What Are The Types Of Class Loaders In Java?

As in keeping with my know-how there are basically 3 sorts of magnificence loader like bootstarp classloader,extension elegance loader and machine elegance loader.

Bootstrap Class Loader

Bootstrap class loader masses java’s middle classes like java.Lang, java.Util and many others. These are instructions which might be part of java runtime environment. Bootstrap class loader is native implementation and so they will differ throughout one of a kind JVMs.

 Extensions Class Loader

JAVA_HOME/jre/lib/ext incorporates jar programs which might be extensions of general core java instructions. Extensions class loader loads classes from this ext folder. Using the machine surroundings propery java.Ext.Dirs you can add ‘ext’ folders and jar documents to be loaded the use of extensions magnificence loader

System Class Loader

Java instructions which might be available within the java classpath are loaded using System elegance loader

Q7. Which Location Do You Want To Work In And Why?

Give your own preference. Also mention a valid purpose for why you have an interest for that vicinity. The purpose need to be always tremendous and clean. Example :- you can aid your circle of relatives from this place,

Q8. What Restrictions Are Placed On Method Overloading?

Two techniques won't have the identical name and argument listing but exclusive return types.

Q9. What Is Downcasting ?

Downcasting is the casting from a widespread to a more specific kind, i.E. Casting down the hierarchy.

Q10. What Is Trient Variable?

Trient variable can’t be serialize. For instance if a variable is declared as trient in a Serializable class and the magnificence is written to an ObjectStream, the cost of the variable can’t be written to the move as an alternative while the class is retrieved from the ObjectStream the value of the variable will become null.

Q11. What Is Difference Between Iterator Access And Index Access?

Basically iterator access procedure the traverse operation via each detail, wherein index get admission to process get entry to direct the detail by means of the usage of the index.

Q12. What Is Collection Api?

The Collection API is a set of instructions and interfaces that guide operation on collections of objects. These training and interfaces are extra flexible, more effective, and greater normal than the vectors, arrays, and hashtables if successfully replaces.

Example of lessons: HashSet, HashMap, ArrayList, LinkedList, TreeSet and TreeMap.

Example of interfaces: Collection, Set, List and Map.

Q13. What Is Java Reflection Api?

Reflection is one of the maximum effective api which assist to paintings with instructions, techniques and variables  dynamically. Basically it investigate the class attributes at runtime. Also we can say it offers a metadata about the class.

Q14. Describe A Problem You Faced And How You Deal With It ?

You can describe any problem you faced at some stage in your undertaking paintings inside the employer. And what the answer you have got carried out for that problem.

Q15. Which Class Is Extended By All Other Classes?

The Object class is extended by way of all other training.

Q16. What Is The % Operator?

It is known as the modulo or remainder operator. It returns the the rest of dividing the primary operand by the second one operand.

Q17. Why Character Array Is Better Than String For Storing Password In Java?

Because, person array shops facts in encrypted format which isn't always readable by way of human. But,the string stores the facts in human readable layout which isn't secure.

Q18. How To Read And Write Image From A File ?

You can use ImageIo.Examine() and ImageIO.Write()  technique of javax.Imageio bundle.

Q19. What Is Daemon Thread In Java ?

A daemon thread is usually runs on history. And it does not prevent the JVM from exiting when the program finishes but the thread continues to be jogging.

Q20. How Many Bits Are Used To Represent Unicode, Ascii, Utf-sixteen, And Utf-8 Characters?

Unicode calls for sixteen bits and ASCII require 7 bits. Although the ASCII person set uses most effective 7 bits, additionally it is represented as 8 bits. UTF-8 represents characters using eight, 16, and 18 bit styles. UTF-sixteen makes use of 16-bit and large bit patterns.

Q21. Why Do You Want To Work In This Industry / Company?

First you have to try and convince that this business enterprise gives big possibility in many element i.E. New technology implementation, the coverage of organisation suits you like professionalism.   Also you could mention that you are big fan of this corporation and its your dream organisation. Basically display your all fantastic attitude closer to agency.

Q22. What Do You Understand By Private, Protected And Public?

These are accessibility modifiers. Private is the most restrictive, while public is the least restrictive. There is not any real difference between protected and the default kind (also called package included) within the context of the identical package deal, but the covered key-word lets in visibility to a derived magnificence in a one-of-a-kind bundle.

Q23. Can A Static Block Throw Exception?

Yes. We can throw checked exception.

Q24. When Can An Object Reference Be Cast To An Interface Reference?

An object reference be forged to an interface reference while the object implements the referenced interface.

Q25. What Is Casting?

There are two varieties of casting, casting between primitive numeric types and casting between item references. Casting among numeric sorts is used to transform large values, inclusive of double values, to smaller values, which includes byte values. Casting among object references is used to consult an object through a well matched class, interface, or array type reference.

Q26. What Is The Difference Between A Static And A Non-static Inner Class?

A non-static internal elegance may have item instances which can be related to times of the class’s outer class. A static internal magnificence does not have any item times.

Q27. How Concurrenthashmap Works?

The basic design of ConcurrentHashMap is to dealing with threading. Basically it locks each of the field (with the aid of default 16) which may be locked independently and thread secure for operation. And it does not disclose the internal lock manner.

Q28. Which Non-unicode Letter Characters May Be Used As The First Character Of An Identifier?

The non-Unicode letter characters $ and _ may also appear as the first person of an identifier.

Q29. What Restrictions Are Placed On The Location Of A Package Statement Within A Source Code File?

A package deal statement ought to seem because the first line in a source code document (excluding clean strains and feedback).

Q30. Can A Byte Object Be Cast To A Double Value?

No, an item can't be solid to a primitive cost.




CFG