Friday, May 18, 2018

Docker Interview Questions



If you are looking for Docker Interview Questions, here is the comprehensive list from basic to most advanced docker container interview questions for 2+, 3+, 4+, 5+ years of experienced professionals. These docker devops interview questions will help you to crack your devops job interview.

Docker Interview Questions

  1. What is Docker?
  2. What is the difference between Docker image and Docker container?
  3. How will you remove an image from Docker?
  4. How is a Docker container different from a hypervisor?
  5. Can we write compose file in JSON file instead of YAML?
  6. Can we run multiple apps on one server with Docker?
  7. What are the common use cases of Docker?
  8. What are the main features of Docker-compose?
  9. What is the most popular use of Docker?
  10. What is the role of open source development in the popularity of Docker?
  11. What is the difference between Docker commands: up, run and start?
  12. What is Docker Swarm?
  13. What are the features of Docker Swarm?
  14. What is a Docker Image?
  15. What is a Docker Container?
  16. What is Docker Machine?
  17. Why do we use Docker Machine?
  18. How will you create a Container in Docker?
  19. Do you think Docker is Application-centric or Machine-centric?
  20. Can we lose our data when a Docker Container exits?
  21. Can we run more than one process in a Docker container?
  22. What are the objects created by Docker Cloud  in Amazon Web Services (AWS) EC2?

Top Docker Interview Questions

  1. How will you take a backup of Docker container volumes in AWS S3?
  2. What are the three main steps of Docker Compose?
  3. What is Pluggable Storage Driver architecture in Docker-based containers?
  4. What is Docker Hub?
  5. What are the main features of Docker Hub?
  6. What are the main security concerns with Docker-based containers?
  7. What are the security benefits of using Container-based system?
  8. How can we check the status of a Container in Docker?
  9. What are the main benefits of using Docker?
  10. How does Docker simplify Software Development process?
  11. What is the basic architecture behind Docker?
  12. What are the popular tasks that you can do with Docker Command line tool?
  13. What type of applications- Stateless or Stateful is more suitable for Docker Container?
  14. How can Docker run on different Linux distributions?
  15. Why do we use Docker on top of a virtual machine?
  16. How can Docker container share resources?
  17. What is the difference between Add and Copy command in a Dockerfile?
  18. What is Docker Entrypoint?
  19. What is ONBUILD command in Docker?
  20. What is Build cache in Docker?
  21. What are the most common instructions in Dockerfile?
  22. What is the purpose of EXPOSE command in Dockerfile?
  23. What are the different kinds of namespaces available in a Container?
  24. How will you monitor Docker in production?
  25. What are the Cloud platforms that support Docker?
  26. How can we control the startup order of services in Docker compose?
  27. Why Docker compose does not wait for a container to be ready before moving on to start the next service in dependency order?
  28. How will you customize Docker compose file for different environments?

Docker Interview Questions and Answers

  1. So what exactly is Docker? Something about “container applications” right?
Docker is an open platform that both IT operations teams and Developer team use to build, ship and run their applications, giving them the agility, portability and control that each team requires across the software supply chain.
We have created a standard Docker container that packages up an application, with everything that the applications require to run. This standardization allows teams to containerize applications and run them in any environment, on any infrastructure and to be written in any language
  1. What is a Docker container and how is it different than a VM?  Does containerization replace my virtualization infrastructure?
Containerization is very different from virtualization. It starts with the Docker engine, the tool that creates and runs containers (1 or more), and is the Docker installed software on any physical, virtual or cloud host with a compatible OS. Containerization leverages the kernel within the host operating system to run multiple root file systems.

We call these root file systems “containers.” Each container shares the kernel within the host OS, allowing you to run multiple Docker containers on the same host. Unlike VMs, containers do not have an OS within it. They simply share the underlying kernel with the other containers.

Each container running on a host is completely isolated so applications running on the same host are unaware of each other (you can use Docker Networking to create a multi-host overlay network that enables containers running on hosts to speak to one another).

The image below shows containerization on the left and virtualization on the right. Notice how containerization (left), unlike virtualization (right) does not require a hypervisor or multiple OSs.

Docker containers and traditional VMs are not mutually exclusive, so no, containers do not have to replace VMs. Docker containers can actually run within VMs. This allows teams to containerize each service and run multiple Docker containers per vm.

Advanced Docker Interview Questions

  1. What’s the benefit of “Dockerizing?
By Dockerizing their environment enterprise teams can leverage the Docker Containers as a Service Platform (CaaS). CaaS gives development teams and IT operations teams agility, portability and control within their environment.

Developers love Docker because it gives them the ability to quickly build and ship applications. Since Docker containers are portable and can run in any environment (with Docker Engine installed on physical, virtual or cloud hosts), developers can go from dev, test, staging and production seamlessly, without having to recode.

This accelerates the application lifecycle and allows them to release applications 13x more often. Docker containers also make it super easy for developers to debug applications, create an updated image and quickly ship an updated version of the application.

IT Ops teams can manage and secure their environment while allowing developers to build and ship apps in a self-service manner. The Docker CaaS platform is supported by Docker, deploys on-premises and is chock full of enterprise security features like role-based access control, integration with LDAP/AD, image signing and many more.

In addition, IT ops teams have the ability to manage to deploy and scale their Dockerized applications across any environment. For example, the portability of Docker containers allows teams to migrate workloads running in AWS over to Azure, without having to recode and with no downtime.

Team cans also migrate workloads from their cloud environment, down to their physical datacenter, and back. This enables teams to utilize the best infrastructure for their business needs, rather than being locked into a particular infrastructure type.

The lightweight nature of Docker containers compared to traditional tools like virtualization, combined with the ability for Docker containers to run within VMs, allowing teams to optimize their infrastructure by 20X, and save money in the process.
  1. From an infrastructure standpoint, what do I need from Docker? Is Docker a piece of hardware running in my datacenter, and how taxing is it on my environment?
The Docker engine is the software that is installed on the host (bare metal server, VM or public cloud instance) and is the only “Docker infrastructure” you’ll need. The tool creates, runs and manages Docker containers. So actually, there is no hardware installation necessary at all.

The Docker Engine itself is very lightweight, weighing in around 80 MB total.

Docker Container Interview Questions

  1. What exactly do you mean by “Dockerized node”? Can this node be on-premises or in the cloud?
A Dockerized node is anything i.e a bare metal server, VM or public cloud instance that has the Docker Engine installed and running on it.

Docker can manage nodes that exist on-premises as well as in the cloud. Docker Datacenter is an on-premises solution that enterprises use to create, manage, deploy and scale their applications and comes with support from the Docker team.

It can manage hosts that exist in your data centre as well as in your virtual private cloud or public cloud provider (AWS, Azure, Digital Ocean, SoftLayer etc.).
  1. Do Docker containers package up the entire OS and make it easier to deploy?
Docker containers do not package up the OS. They package up the applications with everything that the application needs to run. The engine is installed on top of the OS running on a host. Containers share the OS kernel allowing a single host to run multiple containers.
  1. What OS can the Docker Engine run on?
The Docker Engine runs on all modern Linux distributions. We also provide a commercially supported Docker Engine for Ubuntu, CentOS, OpenSUSE, RHEL. There is also a technical preview of Docker running on Windows Server 2016.

IT Admin Docker Interview Questions

  1. How does Docker help manage my infrastructure? Do I containerize all my infrastructure or something?
Docker isn’t focused on managing your infrastructure. The platform, which is infrastructure agnostic, manages your applications and helps ensure that they can run smoothly, regardless of infrastructure type via solutions like Docker Datacenter. This gives your company the agility, portability and controls you require. Your team is responsible for managing the actual infrastructure.
  1. How many containers can run per host?
As far as the number of containers that can be run, this really depends on your environment. The size of your applications as well as the number of available resources (i.e like CPU) will all affect the number of containers that can be run in your environment. Containers, unfortunately, are not magical. They can’t create a new CPU from scratch. They do, however, provide a more efficient way of utilizing your resources. The containers themselves are super lightweight (remember, shared OS vs individual OS per container) and only last as long as the process they are running. Immutable infrastructure if you will.
  1. What do I have to do to begin the “Dockerization process”
The best way for your team to get started is for your developers to download Docker for Mac or Docker Windows. These are native installations of Docker on a Mac or Windows device.

From there, developers will take their applications and create a Dockerfile. The Dockerfile is where all of the application configurations are specified. It is essentially the blueprint for the Docker Image.

The image is a snapshot of your application and is what the Docker Engine looks at so it knows what the container it is spinning up should look like.

Anaplan Interview Questions

Anaplan Interview Questions And Answers. Here w3tutors.com sharing a very useful list of 25 Anaplan questions. These real-time Anaplan interview questions will help you to crack your next Anaplan job interview. All the best for your future and happy Anaplan learning.

Anaplan Interview Questions

  1. What is Anaplan?
  2. What are your key responsibilities in your current job as an Anaplan consultant?
  3. What are the features of Anaplan?
  4. What are the Modeling features of Anaplan?
  5. How Anaplan handles User Access Control?
  6. What is a COLLABORATIVE WORKFLOW in Anaplan?
  7. Explain HISTORY AND REVISION CONTROL in Anaplan?
  8. What is CENTRAL DATA REPOSITORY in Anaplan?
  9. What is DATA SYNCHRONICITY in Anaplan?
  10. Explain INTUITIVE MODELING INTERFACE in Anaplan?
  11. Is Anaplan accessible from Mobile?
  12. What is the use of DASHBOARDS AND REPORTS in Anaplan?
  13. Explain AVAILABILITY AND RELIABILITY in Anaplan?
  14. Explain APPLICATION SECURITY in Anaplan?
  15. What are the modules supported by Anaplan?

Anaplan Interview Questions And Answers

1) What are your key responsibilities in your current job as an Anaplan consultant?
A) It depends on the job roles and differs company to company, but generally, Anaplan consultants involved in identifying business requirements, requirements management, functional design, prototyping, process design (including scenario design, flow mapping), testing, training, defining support procedures and supporting implementations.

2) What is Anaplan?
A) Anaplan is a cloud-based planning and performance management platform with documented use cases in finance, sales, supply chain, marketing, IT and HR.

3) What are the features of Anaplan?
A) Anaplan Platform features:
CLOUD-BASED: Anaplan was built from day one as a cloud platform—combining cutting-edge security, in-memory data management, and massive scalability.
REAL-TIME, SCALABLE MODELING AND CALCULATION ENGINE: RealTimeModeling – By tracking dependencies at the level of the line item, our Hyperblock™ technology enables updates or changes to models of any size, from one to one trillion cells, in real-time.
IN-MEMORY PROCESSING: Anaplan’s in-memory engine enables detailed planning models that utilizes all your data down to the transactional level (Product SKU, Stores, Employees, etc.) for better business decisions.
APP HUB: To get you started quickly, a growing collection of apps for common use cases are available in the Anaplan App Hub. Use them as-is, modify them to suit your special needs, or start from scratch and create your own.
DATA INTEGRATION: Anaplan offers an API, import/export capabilities, and pre-built connectors for common platforms like Anaplan HyperConnect, Informatica, Dell Boomi, Mulesoft, and SnapLogic.
MULTI-DIMENSIONAL PLANNING: Build models to any level of granularity with any number of dimensions—layer in time (daily/weekly/monthly), hierarchies, relationships, and more.
VERSATILITY: Versatility is the ability to model a vast array of processes within your business. The 150+ apps in our App Hub can be applied to vastly different sets of processes, including sales performance optimization, financial budgeting and forecasting, and call center operations. All created by users with clicks, not code.

4) What are the Modeling features of Anaplan?
A) Modelling features of Anaplan:
MASTER REPOSITORY OF BUSINESS RULES (LIVING BLUEPRINT): Using our Living Blueprint technology, all your complex business rules (in natural syntax) are stored and managed in one easy-to-understand worksheet.
MODEL VERSIONS: Anaplan enables users to create new model versions on-the-fly. Quickly replicate models, load with data, and easily track actuals in the same model as plans.
BREAKBACK: With breakback, users can set a target for a formula, and the variables that make up that formula are changed according to the rules specified.
DYNAMIC SCENARIO BUILDING: Anaplan delivers strategic advantage with fast, easy creation of dynamic scenarios with time, version, and list dimensions.

5) How Anaplan handles User Access Control?
A) Anaplan enables flexible role-based security levels for user types. Audit trail, model restore, and selective user access make it possible for analysts to safely and simultaneously collaborate on common models.

6) What is COLLABORATIVE WORKFLOW in Anaplan?
A) Monitor status and approvals with a collaborative workflow that streamlines top-down target allocation and consolidation of roll-ups from the field. A robust audit trail ensures that changes are easy to track.

7) Explain HISTORY AND REVISION CONTROL in Anaplan?
A) Anaplan robust audit trail ensures that changes are easy to track and revert. See a history of users and changes and roll back to earlier versions.

8) What is CENTRAL DATA REPOSITORY in Anaplan?
A) Anaplan delivers a central repository to reconcile various sources of data for clean, reliable hierarchy. Additionally, master data (products, employees, cost centers, etc.) is accessible to analysts around the enterprise.

9) What is DATA SYNCHRONICITY in Anaplan?
A) Anaplan dynamically synchronizes data across connected plans—automatically aggregating and identifying discrepancies for real-time consistency.
Anaplan Interview Questions # 10) Explain INTUITIVE MODELING INTERFACE in Anaplan?
A) Business users can use familiar business syntax, drag-and-drop hierarchies, and built-in logic for time, versions, and scenarios. With Anaplan, there are no technical barriers between you and business insights. No reliance on IT for business rules adjustments, model creation, or changes. No more scripting or broken cell references.

Anaplan Analyst Interview Questions

11) Is Anaplan accessible from Mobile?
A) Yes, Anaplan is accessible from any mobile device via a browser so you never have to be disconnected from your data.

12) What is the use of DASHBOARDS AND REPORTS in Anaplan?
A) Anaplan has a variety of publishing features, including dashboards, charts, PDF generation, and a tightly integrated Excel® plug-in. Share insights with the field, enable management to do their own scenario analysis, and create stunning executive packs.

13) Explain AVAILABILITY AND RELIABILITY in Anaplan?
A) Anaplan invested heavily to provide the highest levels of availability, reliability, and security. Redundant data centers and rigorous processes for back-up, failover, and disaster recovery comply with or exceed all major industry standards. Anaplan delivers constant uptime so that your business-critical data and plans are safe and accessible at all times.

14) Explain APPLICATION SECURITY in Anaplan?
A) In addition to secure data centers, Anaplan provides complete application-layer security, including data encryption on-the-wire, secure authentication protocols, and robust access control and authorization for managing user rights. We also use leading security firms to conduct regular penetration testing.

15) What are the modules supported by Anaplan?
A) Anaplan supports the following modules:
  • Finance
  • Sales
  • Supply chain
  • Workforce
  • Marketing
  • IT
16) What are the features available in Finance module in Anaplan?
A) By connecting financial and operational planning, you can drive valuable business performance more effectively. With Anaplan’s cloud-based platform, corporate objectives align with operating plans that can be adjusted in response to market events—empowering finance to help the business make better decisions by anticipating the future.
  • Strategic Planning – Optimizing business models, product lines, and operational capabilities with ease and confidence.
  • Budgeting and forecasting – Increase speed and agility by automating the manual process and adopting best practices.
  • Operational planning – Take cross-functional decisions to unprecedented levels of operational planning in one platform.
  • Financial consolidation and corporate reporting – Experience a faster, more efficient period-end close and report with confidence—without compromising compliance.
17) What are the features available in Sales module in Anaplan?
A) With Anaplan Sales module, deliver on-time sales plans while increasing compensation, quota, and forecast accuracy.
  • Sales Capacity
  • Account Segmentation and Scoring
  • Territory Planning
  • Quota Planning
  • Deal Desk
  • Sales Forecasting
  • Incentive Compensation
18) What are the features available in Anaplan for Supply chain?
A) Anaplan enables users to connect a global supply chain network for maximum visibility, efficiency, and collaboration.
Product portfolio management
Demand planning
Supply planning
Sales and operations planning
Strategic policy management

19) What are the features available in Anaplan for the workforce?
A) Align people plans to operational goals to support business results with the help of Anaplan for workforce.
  • Workforce
  • Headcount and Cost Planning
  • Workforce Capacity Planning
  • Succession Planning
  • Compensation and Equity Planning
  • Workforce Optimization, including Call Center
  • Onboarding Planning
20) What are the features available in Anaplan for Marketing?
A) ANAPLAN FOR Marketing helps in increasing the efficiency and effectiveness of your marketing plan, performance, and spend.
  • Account Segmentation and Scoring
  • Marketing Resource Management
  • Marketing Performance Management
  • Trade Promotion Planning
  • Market Share and Growth Forecasting
21) What are the features available in Anaplan for IT?
A) ANAPLAN FOR IT drive agile IT planning and project execution across your business.
  • Agile Implementation
  • ABC Shared Services Allocations
  • Agile Planning
  • Project Plan Capacity Analysis
  • Business Case Management
  • Project Planning
  • IT Financial Management and Cost Transparency
  • Business Management Scorecard
  • Facilities Management
22) Do you know any Anaplan Customers?
A) Yes I know, many major companies using Anaplan, few of them are
VMWare
Tableau
Intel
HP
BOX
Motorola
Tata Steel

23) What are Anaplan Apps?
A) Anaplan is the only technology in the world that enables business users to easily build sophisticated planning apps with zero coding.
Anaplan enables users to turn the complexity of business operations into powerful, easy-to-use applications for forecasting, planning, modeling, and performance management.

24) What is Anaplan App Hub?
A) The Anaplan App Hub enables customers and partners to build, share, and deploy cutting-edge apps. The Anaplan community brings together experts from a wide range of business domains, industries, and organizations. You can quickly discover the applications you need, deploy them in one click, and customize them to solve your company’s complex challenges. You can also easily build your own applications on the platform and share them with others.

25) What are the advantages of Anaplan?
A) The flexibility and scalability of the Anaplan platform means it can serve as a basis for financial, commercial as well as operational planning models. Furthermore, these models can easily be linked and work in seamless integration with one another.
Models can either be built from scratch, or extended and customized based on pre-delivered models – with models existing for topics such as
  • Traditional P&L,
  • Balance Sheet & Cash Flow Planning,
  • Financial Consolidation,
  • Premium Modeling and Claims Analysis for insurance,
  • Sales Forecasting, Territory Planning,
  • Quota Management,
  • Pricing & Commission Calculation and many others.
This selection of models is constantly being extended. An Anaplan ‘model/app store’ will further accelerate availability.

Oracle Performance Tuning Interview Questions

Oracle Performance Tuning Interview Questions And Answers. If you are looking for Performance Tuning Interview Questions, here is the comprehensive list from basic to most advanced oracle database performance tuning interview questions for 2+, 3+, 4+, 5+ years of experienced professionals. These oracle performance tuning interview questions will help you to crack your oracle job interview.

Oracle Performance Tuning Interview Questions

What Is Performance Tuning?
Making optimal use of the system using existing resources called performance tuning.

What Are The Types Of Tunings?
CPU TuningMemory TuningIO TuningApplication TuningDatabase Tuning

What Mainly Database Tuning Contains?
Hit RatiosWait Events

What Is An Optimizer?
The optimizer is a mechanism which will make the execution plan of an SQL statement.

What Are The Types Of Optimizers?
RBO(Rule Based Optimizer)CBO(Cost Based Optimizer)

Which Optimizer Is The Best One?
CBO

What Are The Pre Requested To Make Use Of Optimizer?
Set the optimizer modeCollect the statistics of an object

How Do You Collect Statistics Of A Table?
Analyze table emp compute statistics or analyze table emp estimate statistics.

What Is The Diff Between Compute And Estimate?
If you use compute, The FTS will happen, if you use estimate just 10% of the table will be read

Data Dictionary Follows Which Optimizer Mode?
RBO.

How Do You Delete Statistics Of An Object?
Analyze table emp delete statistics.

How Do You Collect Statistics Of A User/schema?
exec dbms_stats.gather_schema_stats(scott)

How Do You See The Statistics Of A Table?
select num_rows,blocks,empty_blocks from dba_tables where tab_name=’emp’

What Are Chained Rows?
These are rows, it spans in multiple blocks.

Oracle Performance Tuning Interview Questions And Answers

How Do You Collect Statistics Of A User In Oracle Apps?
fnd_stats package.

How Do You Know What Sql Is Currently Being Used By The Session?
By goind v$sql and v$sql_area.

What Is A Execution Plan?
Its a road map how SQL is being executed by oracle db.

How Do You Get The Index Of A Table And On Which Column The Index Is?
dba_indexes and dba_ind_columns

Which Init Parameter You Have To Set To Bypass Parsing?
cursor_sharing=force

How Do You Know Which Session Is Running Long Jobs?
by going v$session_longops

How Do You Flush The Shared Pool?
alter system flush shared_pool

How Do You Get The Info About Fts?
using v$sysstat

How Do You Increase The Db Cache?
alter table emp cache

Where Do You Get The Info Of Library Cache?
v$librarycache

How Do You Get The Information Of Specific Session?
v$mystat

How Do You See The Trace Files?
using tkprof usage: tkprof allllle.trc llkld.txt

Performance Tuning Interview Questions

A tablespace has a table with 30 extents in it. Is this bad? Why or why not?
Expected answer: Multiple extents in and of themselves aren’t bad.
However, if you also have chained rows this can hurt performance.

How do you set up tablespaces during an Oracle installation?
Expected answer: You should always attempt to use the Oracle Flexible Architecture standard or another partitioning scheme to ensure proper separation of SYSTEM, ROLLBACK, REDO LOG, DATA, TEMPORARY and INDEX segments.

You see multiple fragments in the SYSTEM tablespace, what should you check first?
Expected answer: Ensure that users don’t have the SYSTEM tablespace as their TEMPORARY or DEFAULT tablespace assignment by checking the DBA_USERS view.

What are some indications that you need to increase the SHARED_POOL_SIZE parameter?
Expected answer: Poor data dictionary or library cache hit ratios, getting error ORA-04031. Another indication is steadily decreasing performance with all other tuning parameters the same.

What is the general guideline for sizing db_block_size and db_multi_block_read for an application that does many full table scans?
Expected answer: Oracle almost always reads in 64k chunks. The two should have a product equal to 64 or a multiple of 64.

What is the fastest query method for a table?
Expected answer: Fetch by
rowid

Explain the use of TKPROF? What initialization parameter should be turned on to get full TKPROF output?
Expected answer:
The tkprof tool is a tuning tool used to determine cpu and execution times for SQL statements. You use it by first setting timed_statistics to true in the initialization file and then turning on tracing for either the entire database via the sql_trace parameter or for the session using the ALTER SESSION command.
Once the trace file is generated you run the
tkprof
tool against the trace file and then look at the output from the
tkprof
tool. This can also be used to generate explain plan output.

When looking at v$sysstat you see that sorts (disk) is high. Is this bad or good? If bad, how do you correct it?
Expected answer: If you get excessive disk sorts this is bad. This indicates you need to tune the sort area parameters in the initialization files. The major sort is parameter is the SORT_AREA_SIZe parameter.

Advanced Oracle Performance Tuning Interview Questions

When should you increase copy latches? What parameters control copy latches?
Expected answer: When you get excessive contention for the copy latches as shown by the “redo copy” latch hit ratio. You can increase copy latches via the initialization parameter LOG_SIMULTANEOUS_COPIES to twice the number of CPUs on your system.

Where can you get a list of all initialization parameters for your instance? How about an indication if they are default settings or have been changed?
Expected answer: You can look in the init.ora file for an indication of manually set parameters. For all parameters, their value and whether or not the current value is the default value, look in the v$parameter view.

Describe hit ratio as it pertains to the database buffers. What is the difference between instantaneous and cumulative hit ratio; which should be used for tuning?
Expected answer: Hit ratio is a measure of how many times the database was able to read a value from the buffers verses how many times it had to re-read a data value from the disks.
A value greater than 80-90% is good, less could indicate problems. If you take the ratio of existing parameters this will be a cumulative value since the database started.
If you do a comparison between pairs of readings based on some arbitrary time span, this is the instantaneous ratio for that time span. Generally speaking an instantaneous reading gives more valuable data since it will tell you what your instance is doing for the time it was generated over.

Discuss row chaining, how does it happen? How can you reduce it? How do you correct it?
Expected answer: Row chaining occurs when a VARCHAR2 value is updated and the length of the new value is longer than the old value and won’t fit in the remaining block space.
This results in the row chaining to another block. It can be reduced by setting the storage parameters on the table to appropriate values. It can be corrected by the export and import of the effected table.

Oracle Database Tuning Questions

When looking at the estat events report you to see that you are getting busy buffer waits. Is this bad? How can you find what is causing it?
Expected answer: Buffer busy waits may indicate contention in redo, rollback or data blocks. You need to check the v$waitstat view to see what areas are causing the problem.
The value of the “count” column tells where the problem is, the “class” column tells you with what. UNDO is rollback segments, DATA is database buffers.

If you see contention for library caches how can you fix it?
Expected answer: Increase the size of the shared pool.

If you see statistics that deal with “undo” what are they really talking about?
Expected answer: Rollback segments and associated structures.

If a tablespace has a default pctincrease of zero what will this cause (in relationship to the smon process)?
Expected answer: The SMON process won’t automatically coalesce its free space fragments.

If a tablespace shows excessive fragmentation what are some methods to defragment the tablespace? (7.1,7.2 and 7.3 only)
Expected answer: In Oracle 7.0 to 7.2 The use of the ‘alter session set events ‘immediate trace name coalesce level ts#’;’ command is the easiest way to defragment contiguous free space fragmentation.
The ts# parameter corresponds to the ts# value found in the ts$ SYS table. In version 7.3 the ‘alter tablespace coalesce;’ is best. If free space isn’t contiguous then export, drop and import of the tablespace contents may be the only way to reclaim non-contiguous free space.

How can you tell if a tablespace has excessive fragmentation?
If a select against the dba_free_space table shows that the count of a tablespaces extents is greater than the count of its data files, then it is fragmented.
You see the following on a status report:
redo log space requests 23
redo log space wait time 0

Is this something to worry about? What if redo log space wait time is high? How can you fix this?
Expected answer: Since wait time is zero, no. If wait time was high it might indicate a need for more or larger redo logs.

Java Multiple Choice Questions and Answers

Java Multiple Choice Questions And Answers 2018. Here w3tutors.com sharing a list of 60 core java and advanced java multiple choice questions and answers for freshers and experienced. These java multiple choice interview questions asked in various java interview exams. We hope that this list of java mcq questions will help you to crack your next java mcq online test. All the best for your future and happy java learning.

 Java Multiple Choice Questions

1) The default value of a static integer variable of a class in Java is,
(a) 0 (b) 1 (c) Garbage value (d) Null (e) -1.
A) a
2) What will be printed as the output of the following program?
public class testincr
{
public static void main(String args[])
{
int i = 0;
i = i++ + i;
System.out.println(“I = ” +i);
}
}
(a) I = 0 (b) I = 1 (c) I = 2 (d) I = 3 (e) Compile-time Error.
A) b
3) Multiple inheritance means,
(a) one class inheriting from more super classes
(b) more classes inheriting from one super class
(c) more classes inheriting from more super classes
(d) None of the above
(e) (a) and (b) above.
A) a
4) Which statement is not true in java language?
(a) A public member of a class can be accessed in all the packages.
(b) A private member of a class cannot be accessed by the methods of the same class.
(c) A private member of a class cannot be accessed from its derived class.
(d) A protected member of a class can be accessed from its derived class.
(e) None of the above.
A) b
5) To prevent any method from overriding, we declare the method as,
(a) static (b) const (c) final (d) abstract (e) none of the above.
A) c
6) Which one of the following is not true?
(a) A class containing abstract methods is called an abstract class.
(b) Abstract methods should be implemented in the derived class.
(c) An abstract class cannot have non-abstract methods.
(d) A class must be qualified as ‘abstract’ class, if it contains one abstract method.
(e) None of the above.
A) c
7) The fields in an interface are implicitly specified as,
(a) static only (b) protected (c) private
(d) both static and final (e) none of the above.
d
8) What is the output of the following program:
public class testmeth
{
static int i = 1;
public static void main(String args[])
{
System.out.println(i+” , “);
m(i);
System.out.println(i);
}
public void m(int i)
{
i += 2;
}
}
(a) 1 , 3 (b) 3 , 1 (c) 1 , 1 (d) 1 , 0 (e) none of the above.
A) c
9) Which of the following is not true?
(a) An interface can extend another interface.
(b) A class which is implementing an interface must implement all the methods of the interface.
(c) An interface can implement another interface.
(d) An interface is a solution for multiple inheritance in java.
(e) None of the above.
A) c
10) Which of the following is true?
(a) A finally block is executed before the catch block but after the try block.
(b) A finally block is executed, only after the catch block is executed.
(c) A finally block is executed whether an exception is thrown or not.
(d) A finally block is executed, only if an exception occurs.
(e) None of the above.
A) c

Java Multiple Choice Questions And Answers

11) Among these expressions, which is(are) of type String?
(a) “0” (b) “ab” + “cd”
(c) ‘0’
(d) Both (A) and (B) above (e) (A), (B) and (C) above.
A) d
12) Consider the following code fragment
Rectangle r1 = new Rectangle();
r1.setColor(Color.blue);
Rectangle r2 = r1;
r2.setColor(Color.red);
After the above piece of code is executed, what are the colors of r1 and
r2 (in this order)?
(a) Color.blue
Color.red
(b) Color.blue
Color.blue
(c) Color.red
Color.red
(d) Color.red
Color.blue
(e) None of the above.
A) c
13) What is the type and value of the following expression? (Notice the integer division)
-4 + 1/2 + 2*-3 + 5.0
(a) int -5 (b) double -4.5
(c) int -4
(d) double -5.0 (e) None of the above.
A) d
14) What is printed by the following statement?
System.out.print(“Hello,\nworld!”);
(a) Hello, \nworld! (b) Hello, world!
(c)
(d) “Hello, \nworld!” (e) None of the above.
A) c
15) Consider the two methods (within the same class)
public static int foo(int a, String s)
{
s = “Yellow”;
a=a+2;
return a;
}
public static void bar()
{
int a=3;
String s = “Blue”;
a = foo(a,s);
System.out.println(“a=”+a+” s=”+s);
}
public static void main(String args[])
{
bar();
}
What is printed on execution of these methods?
(a) a = 3 s = Blue (b) a = 5 s = Yellow (c) a = 3 s = Yellow
(d) a = 5 s = Blue (e) none of the above.
A) d
16) Which of the following variable declaration would NOT compile in a java program?
(a) int var; (b) int VAR; (c) int var1; (d) int var_1; (e) int 1_var;.
A) e
17) Consider the following class definition:
public class MyClass
{
private int value;
public void setValue(int i){ / code / }
// Other methods…
}
The method setValue assigns the value of i to the instance field value. What could you write for the implementation of setValue?
(a) value = i; (b) this.value = i; (c) value == i;
(d) Both (A) and (B) and above (e) (A), (B) and (C) above.
A) d
18) Which of the following is TRUE?
(a) In java, an instance field declared public generates a compilation error.
(b) int is the name of a class available in the package java.lang
(c) Instance variable names may only contain letters and digits.
(d) A class has always a constructor (possibly automatically supplied by the java compiler).
(e) The more comments in a program, the faster the program runs.
A) d
19) A constructor
(a) Must have the same name as the class it is declared within.
(b) Is used to create objects.
(c) May be declared private
(d) Both (A) and (B) above
(e) (a), (b) and (c) above.
A) e
20) Consider,
public class MyClass
{
public MyClass(){/code/}
// more code…
}
To instantiate MyClass, you would write?
(a) MyClass mc = new MyClass();
(b) MyClass mc = MyClass();
(c) MyClass mc = MyClass;
(d) MyClass mc = new MyClass;
(e) The constructor of MyClass should be defined as, public void MyClass(){/code/}.
A) a

Java Programming Multiple Choice Questions

Java Multiple Choice Questions 21) What is byte code in the context of Java?
(a) The type of code generated by a Java compiler.
(b) The type of code generated by a Java Virtual Machine.
(c) It is another name for a Java source file.
(d) It is the code written within the instance methods of a class.
(e) It is another name for comments written within a program.
A) a
Java Multiple Choice Questions 22) What is garbage collection in the context of Java?
(a) The operating system periodically deletes all the java files available on the system.
(b) Any package imported in a program and not used is automatically deleted.
(c) When all references to an object are gone, the memory used by the object is automatically reclaimed.
(d) The JVM checks the output of any Java program and deletes anything that doesn’t make sense.
(e) Janitors working for Sun Micro Systems are required to throw away any Microsoft documentation found in the employees’ offices.
A) c
Java Multiple Choice Questions 23) You read the following statement in a Java program that compiles and executes.
submarine.dive(depth);
What can you say for sure?
(a) depth must be an int
(b) dive must be a method.
(c) dive must be the name of an instance field.
(d) submarine must be the name of a class
(e) submarine must be a method.
A) b
Java Multiple Choice Questions 24) The java run time system automatically calls this method while garbage collection.
(a) finalizer() (b) finalize() (c) finally()
(d) finalized() (e) none of the above.
A) b
Java Multiple Choice Questions 25) The correct order of the declarations in a Java program is,
(a) Package declaration, import statement, class declaration
(b) Import statement, package declaration, class declaration
(c) Import statement, class declaration, package declaration
(d) Class declaration, import statement, package declaration
(e) Class declaration, package declaration, import statement.
A) a
Java Multiple Choice Questions 26) An overloaded method consists of,
(a) The same method name with different types of parameters
(b) The same method name with different number of parameters
(c) The same method name and same number and type of parameters with different return type
(d) Both (a) and (b) above
(e) (a), (b) and (c) above.
A) d
Java Multiple Choice Questions 27) A protected member can be accessed in,
(a) a subclass of the same package (b) a non-subclass of the same package
(c) a non-subclass of different package (d) a subclass of different package
(e) the same class.
Which is the false option?
A) c
Java Multiple Choice Questions 28) What is the output of the following code:
class eq
{
public static void main(String args[])
{
String s1 = “Hello”;
String s2 = new String(s1);
System.out.println(s1==s2);
}
}
(a) true (b) false (c) 0 (d) 1 (e) Hello.
A) b
Java Multiple Choice Questions 29) All exception types are subclasses of the built-in class
(a) Exception (b) RuntimeException (c) Error
(d) Throwable (e) None of the above.
A) d
Java Multiple Choice Questions 30) When an overridden method is called from within a subclass, it will always refer to the version of that method defined by the
(a) Super class
(b) Subclass
(c) Compiler will choose randomly
(d) Interpreter will choose randomly
(e) None of the abvove.
A) b

Java Multiple Choice Questions With Answers

Java Multiple Choice Questions 31) Mark the incorrect statement from the following:
(a) Java is a fully object oriented language with strong support for proper software engineering techniques
(b) In java it is not easy to write C-like so called procedural programs
(c) In java language objects have to be manipulated
(d) In java language error processing is built into the language
(e) Java is not a language for internet programming.
A) d
Java Multiple Choice Questions 32) In java, objects are passed as
(a) Copy of that object (b) Method called call by value
(c) Memory address (d) Constructor
(e) Default constructor.
A) c
Java Multiple Choice Questions 33) Which of the following is not a component of Java Integrated Development Environment (IDE)?
(a) Net Beans (b) Borland’s Jbuilder
(c) Symantec’s Visual CafĂ© (d) Microsoft Visual Fox Pro
(e) Microsoft Visual J++.
A) c
Java Multiple Choice Questions 34) Identify, from among the following, the incorrect variable name(s).
(a) _theButton (b) $reallyBigNumber
(c) 2ndName (d) CurrentWeatherStateofplanet
(e) my2ndFont.
A) c
Java Multiple Choice Questions 35) Use the following declaration and initialization to evaluate the Java expressions
int a = 2, b = 3, c = 4, d = 5;
float k = 4.3f;
System.out.println( – -b * a + c *d – -);
(a) 21 (b) 24 (c) 28 (d) 26 (e) 22.
A) b
Java Multiple Choice Questions 36) Use the following declaration and initialization to evaluate the Java expressions
int a = 2, b = 3, c = 4, d = 5;
float k = 4.3f;
System.out.println(a++);
(a) 3 (b) 2 (c) 4 (d) 10 (e) Synatax error.
A) b
Java Multiple Choice Questions 37) Use the following declaration and initialization to evaluate the Java expressions
int a = 2, b = 3, c = 4, d = 5;
float k = 4.3f;
System.out.println (-2U * ( g – k ) +c);
(a) 6 (b) 3 (c) 2 (d) 1 (e) Syntax error.
A) e
Java Multiple Choice Questions 38) Use the following declaration and initialization to evaluate the Java expressions
int a = 2, b = 3, c = 4, d = 5;
float k = 4.3f;
System.out.println (c=c++);
(a) 2 (b) 4 (c) 5 (d) 8 (e) Syntax error.
A) b
Java Multiple Choice Questions 39) Consider the following Java program :
class IfStatement{
public static void main(String args[])
{
int a=2, b=3;
if (a==3)
if (b==3)
System.out.println(“===============”);
else
System.out.println(“#################”);
System.out.println(“&&&&&&&&&&&”);
}
}
Which of the following will the output be?
(a) ===============
(b) #################
&&&&&&&&&
(c) &&&&&&&&&&&
(d) ===============
#################
&&&&&&&&&&
(e) ################.
A) c
Java Multiple Choice Questions 40) An applet cannot be viewed using
(a) Netscape navigator
(b) Microsoft Internet Explorer
(c) Sun’ Hot Java Browser
(d) Applet viewer tool which comes, with the Java Development Kit.
(e) Jbuilder.
A) d
Use the following Java program for answering question 11 and 12
class test{
void meth(int i, int j)
{
i *= 2;
i /= 2;
}
}
class argumentPassing
{
public static void main(String args[])
{
test ob = new test();
int a = 15, b = 20;
System.out.println(“a and b before call :”+ a +” ” + b);
ob.meth(a,b);
System.out.println(“a and b after call : “+ a + ” ” +b);
}

Core Java Multiple Choice Questions With Answers

41) What would the output be of the above Program – III before and after it is called?
(a) and b before call : 15 20 a and b after call : 30 10
(b) a and b before call : 5 2 a and b after call : 15 20
(c) a and b before call : 15 20 a and b after call : 15 20
(d) a and b before call : 30 10 a and b after call : 15 20
(e) a and b before call : 15 20 a and b after call :
A) c
42) What would the argument passing method be which is used by the above Program – III?
(a) Call by value (b) Call by reference
(c) Call by java.lang class (d) Call by byte code
(e) Call by compiler.
A) a
43) Consider the following program:
class prob1{
int puzzel(int n){
int result;
if (n==1)
return 1;
result = puzzel(n-1) * n;
return result;
}
}
class prob2{
public static void main(String args[])
{
prob1 f = new prob1();
System.out.println(” puzzel of 6 is = ” + f.puzzel(6));
}
}
Which of the following will be the output of the above program?
(a) 6 (b) 120 (c) 30 (d) 720 (e) 12.
A) d
44) The blank space in the following sentence has to be correctly filled :
Members of a class specified as ……………….. are accessible only to methods of that class.
(a) Protected (b) Final (c) Public (d) Private (e) Static.
A) d
45) Java compiler javac translates Java source code into ………………………
(a) Assembler language (b) Byte code
(c) Bit code (d) Machine code
(e) Platform dependent code.
A) b
46) ……………….. are used to document a program and improve its readability.
(a) System cells (b) Keywords (c) Comments (d) Control structures (e) Blocks.
A) c
47) In Java, a character constant’s value is its integer value in the ………………………character set.
(a) EBCDIC (b) Unicode (c) ASCII (d) Binary (e) BCD.
A) b
48) In Java, a try block should immediately be followed by one or more ……………….. blocks.
(a) Throw (b) Run (c) Exit (d) Catch (e) Error.
A) d
49) An abstract data type typically comprises a …………… and a set of ……………… respectively.
(a) Data representation, classes (b) Database, operations
(c) Data representation, objects (d) Control structure, operations
(e) Data representation, operations.
A) e
50) In object-oriented programming, the process by which one object acquires the properties of another object is called
(a) Encapsulation (b) Polymorphism (c) Overloading
(d) Inheritance (e) Overriding.
A) d

Advanced Java Multiple Choice Questions Ans Answers

51) Re-implementing an inherited method in a sub class to perform a different task from the parent class is called
(a) Binding (b) Transferring (c) Hiding (d) Coupling (e) extending.
A) e
52) In a class definition, the special method provided to be called to create an instance of that class is known as a/an
(a) Interpreter (b) Destructor (c) Constructor (d) Object (e) Compiler.
A) c
53) Consider the following statements about Java packages:
I. Packages don’t provide a mechanism to partition all class names into more manageable chunks.
II. Packages provide a visibility control mechanism.
III. One of the important properties of a package is that all classes defined inside a package is accessible by code outside that package.
IV. The .class files for classes declared to be part of a package can be stored in multiple directories.
Which of them is correct?
(a) Only (I) above (b) Only (II) above
(c) Only (III) above (d) Only (IV) above
(e) All (I), (II), (III) and (IV) above are wrong.
A) b
54) Consider the following statements:
I. A class can be declared as both abstract and final.
II. A class declared as final can be extended by defining a sub-class.
III. Resolving calls to methods dynamically at run-time is called late binding.
IV. The class Object defined by Java need not be a super class of all other classes.
Identify the correct statement from the following:
(a) Both (I) and (II) above (b) Both (III) and (IV) above
(c) Both (I) and (III) above (d) Both (II) and (IV) above
(e) Only (III) above.
A) e
55) Identify, from among the following, the incorrect descriptions related to Java :
(a) Java Virtual Machine translates byte code into its own system’s machine language and runs the resulting machine code
(b) The arithmetic operations *, /, %, + and – have the same level of precedence
(c) Comments do not cause any action to be performed during the program execution
(d) All variables must be given a type when they are declared
(e) Java variable names are case-sensitive.
A) b
56) Consider the following statement(s) about Java:
I. All white-space characters (blanks) are ignored by the compiler.
II. Java keywords can be used as variable names.
III. An identifier does not begin with a digit and does not contain any spaces.
IV. The execution of Java applications begins at method main.
Which of them is correct?
(a) Both (I) and (III) above (b) Both (II) and (IV) above
(c) Both (I) and (II) above (d) (III) and (IV) above
(e) All (I), (II), (III) and (IV) above.
A) d
57) Consider the following data types in Java :
I. Int II. Boolean III. Double IV. String V. Array.
Which of them are simple data types?
(a) Both (I) and (II) above (b) (I), (II), (III) and (IV) above
(c) (I), (II) and (III) above (d) (II) and (III) above
(e) All (I), (II), (III), (IV) and (V) above.
A) c
58) For what values respectively of the variables gender and age would the Java expression gender == 1 && age >= 65 become true?
(a) gender = 1, age = 60 (b) gender = 1, age = 50
(c) gender = 1, age = 65 (d) gender = 0, age = 70
(e) gender = 0, age = 55.
A) c
59) Consider the following Java program :
public class Compute {
public static void main (string args [ ])
{
int result, x ;
x = 1 ;
result = 0;
while (x < = 10) {
if (x%2 == 0) result + = x ;
+ + x ;
}
System.out.println(result) ;
}
}
Which of the following will be the output of the above program?
(a) 55 (b) 30 (c) 25 (d) 35 (e) 45.
A) b
60) Which of the following statements about Java Threads is correct?
(a) Java threads don’t allow parts of a program to be executed in parallel
(b) Java is a single-threaded language
(c) Java’s garbage collector runs as a high priority thread
(d) Ready, running and sleeping are three states that a thread can be in during its life cycle
(e) Every java application is not multithreaded.
A) d

Top 50 PHP Interview Questions You Must Prepare in 2020

PHP is a recursive acronym for PHP Hypertext Preprocessor. It is a widely used open-source programming language especially suited for cr...