• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 24 pages
Exam (elaborations)

Java Interview Questions and Answers

Document preview thumbnail
Preview 3 out of 24 pages

How to delete a character in a String ~ Because Strings in Java are immutable. You'll have to create a new string removing the character you don't want. String newstr = ring(0, idx) + ring(idx + 1); public String removeChar(String str, Integer n) { String front = ring(0, n); String back = ring(n+1, h()); return front + back; } What is Object Oriented Programming ~ Object-oriented programming (OOP) is a programming language model organized around objects rather than "actions" and data rather than logic. The first step in OOP is to identify all the objects the programmer wants to manipulate and how they relate to each other, an exercise often known as data modeling. What are be benefits of Object-Oriented Programming ~ Improved code reuse. Improved software maintainability. Faster development. 4 major principles that make a language object-oriented. ~ Encapsulation, Data Abstraction, Polymorphism and Inheritence. Describe the software development lifecycle ~ Communication, System concept development, What is multithreading? ~ Multithreading is a process of executing multiple threads simultaneously. Its main advantage is: Threads share the same add

Content preview

Java Interview Questions
and Answers
How to delete a character in a String


✓~ Because Strings in Java are immutable. You'll have to create a new string removing

the character you don't want.




String newstr = str.substring(0, idx) + str.substring(idx + 1);




public String removeChar(String str, Integer n) {

String front = str.substring(0, n);

String back = str.substring(n+1, str.length());

return front + back;

}




What is Object Oriented Programming


✓~ Object-oriented programming (OOP) is a programming language model organized

around objects rather than "actions" and data rather than logic.

,The first step in OOP is to identify all the objects the programmer wants to

manipulate and how they relate to each other, an exercise often known as data

modeling.




What are be benefits of Object-Oriented Programming


✓~ Improved code reuse.

Improved software maintainability.

Faster development.




4 major principles that make a

language object-oriented.


✓~ Encapsulation, Data Abstraction, Polymorphism and Inheritence.




Describe the software development lifecycle


✓~ Communication, System concept development,




What is multithreading?


✓~ Multithreading is a process of executing multiple threads simultaneously. Its main

advantage is:




Threads share the same address space.

, Thread is lightweight.

Cost of communication between process is low.




What is thread?


✓~ A thread is a lightweight subprocess.It is a separate path of execution.It is called

separate path of execution because each thread runs in a separate stack frame.




What is difference between JDK,JRE and JVM?


✓~ JVM is an acronym for Java Virtual Machine, it is an abstract machine which provides

the runtime environment in which java bytecode can be executed. It is a specification.

JRE stands for Java Runtime Environment. It is the implementation of JVM.

JDK is an acronym for Java Development Kit. It physically exists. It contains JRE +

development tools.




How many types of memory areas are allocated by JVM?


✓~ Class(Method) Area

Heap

Stack

Program Counter Register

Native Method Stack

Document information

Uploaded on
August 4, 2024
Number of pages
24
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$12.29

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Axpert
3.8
(127)
Sold
592
Followers
168
Items
29611
Last sold
4 days ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions