SlideShare ist ein Scribd-Unternehmen logo
1 von 4
JAVA Interview Questions and Answers:
Can a constructor be made final?
No, thisis not possible.
staticmembersbelong to a class, but the constructor is needed to create an object. An abstract classis a
partiallyimplemented class,which containsabstract methods to be implemented in child class. final
restrictsmodification: variablesbecome constant, methodscan't be overridden, and classes can't be
inherited.
No. constructors are similar to methods,but cannot be invoked directlyby a method call. They are used
to initialize new class instances.Like methods, theymay be overloaded
What is the APK format?
The Android packaging key is compressed with classes,UI's, supportive assetsand manifest.All filesare
compressed to a single file is called APK.
APK standsfor android Application Package File(APK), it is zip file formatted packages based on the
android application code.
Android application package (APK) is the package file format used by the Android operatingsystem for
distribution and installation of mobile appsand middleware. APK filesare analogous to other software
packages such as APPXin Microsoft Windows or Deb packages in Debian-based operatingsystemslike
Ubuntu.
What do you know about Java?
Java is a high-level programminglanguage originallydeveloped bySun Microsystems and released in
1995. Java runs on a varietyof platforms, such as Windows, Mac OS, and the various versions of UNIX.
Some of the advantagesof the Java:
ď‚· The code is compiled into bytecode, it is like code once and run anywhere. It eliminatesthe need for
platform-specificversions.
ď‚· Unlike other languages,the code is very robust.
ď‚· Object-oriented language.
ď‚· The appletsrunsfaster
ď‚· Compared to C++, Java is easy to learn.
Java is an portable language which supportsobject oriented featureslike inheritance,polymorphism and
encapsulation and it is platform independent once compile and run any where with the help of JVM.IN
JVM we have native stack which is used to store non java code and it helps the programer to covert it to
java code.
What is stored procedure?
1. Stored procedure is a pre-compiled Sql statements. 2. That meansstored procedure will contain sql
statementslike SELECT, UPDATE, DELETE and so on which is alreadycompiled. Syntax: Create
procedure procedurename () As Begin { } end
A stored procedure is a bunch of SQL statementsthat are stored in the DB. The different types of stored
procedures; a) System Stored Procedures b) User Defined Stored Proceduresc) Extended Stored
Procedures.These procedureswill accept input parametersso that a single procedure can be called by
several clients. The benefits of the Stored Procedures are: - Faster Execution - Implementsmodule
programming - Minimize the networktraffic
Stored procedure is simplya set operationsperformed on table...with different conditions.
what is boolean?
Boolean valuesare the two constant objects True and False, are used to represent truth values(other
valuescan also be considered false or true).
In numericcontexts (for example, when used as the argument to an arithmeticoperator), they behave
like the integers0 and 1, respectively.
The built-in function bool() can be used to cast any value to a Boolean, if the value can be interpreted as
a truth value.
This is very basic answer, can some body add more points
Boolean or bool consists of operators such as AND, OR, NOT and XOR. Booleans are commonly used in programming to set
the result in the value of TRUE or FALSE.
I am searching for free JSON API string to build
my demo application, any references?
I found couple of links, which might be useful for your requirement.
- https://www.reddit.com/.json (without CORSrestriction)
- http://chancejs.com
- http://jsonplaceholder.typicode.com
You have to build a backend using php for example. Set specific URI's for specific functionality to handle
POST or GET requests.For example for login purposes you can set a url //example.com/login and send
your login username and password.
On that link your PHP getsthe data, and logs or rejectsto log the user according the the data. Or you can
get just information from the database. For example //example.com/getpost/?id=1. From the linkyou
php gets the Id, and after fetchingthe data from the database, buldsas a json, and returnsthe data.
When should you use Div, Section or Article?
Div : Div is a block element.
Section: section groups the content related to a single concept / topic, its like a subsection of a major
article. Similar to a new paper section, it might have header, body and footer (may be).
Article: you can understand it asa complete document, which can be distributable asindependent
component.
It makes no difference when you are looking from the view of designer!There are all html blocks, which
you can change, manage usingcss as you want the same way. It makesmore sense when your are
looking on them from the view of SEO. It makesreally much more difference!In articlesSearch engines
are looking for articlesfirst, and for articlessearch engines are looking in articlestag. So You deside
when to use which one. Sections are more for logical sections, when your tryingto divide your page to
logical sections, not usingmany divs which will make your html structure more complicated. They came
to help to structure more effective, and easy.
public static void main(String []args) in detail
thisis we called asmain method.atleast in one place it should exist in a program.
here
"public" will defines"access modifier",
static will define "type of method"by which we need to decide either we need to refer with "classname"
r "objectname".
void will define "return tye of the method".
"(string[ ]args)" will defines "object of args of string class".
Java is a pure Object Oriented Language. Anythingyou write in a Java Program should reside in a Class.
Assume you have write a simple java program. So you write a Classnamed that containsthe methods
which perform your logic.
Now to run your logic you have to create an object to your class. So to create an object you should have
atleast one method that have access with out creating an object. Hence the main method was declared
as "static". Now the Java Virtual Machine(JVM) can call the main method as ClassName.main()
public is the access specifier which tells that the main method can be accessed from outside the class.
void is the return type of the main method.
String[] args is used to pass any arguments. Java only accepts the array of Stringsas arguments.
Why Constructor name is same as Class name
Constructor is called immediatelyafter an object of a class is created. To reduce the number of keywords
in Java, name of the constructor is defined same as the Class name. The Java developersdon't want to
include new keyword for constructor. They want to keep it simple and precise.
So that it can be unambigouslyidentified asthe constructor. and how its get invoked implicitlywhen we
create object of that class. It is invoked by the compiler because it hasalreadybeen unambiguously
identified because of itsnamingsheme.
What is the difference between a Window and a
Frame?
The Frame class extends Window to define a main application window that can have a menu bar.
Frame: It is a window with title bars and borders.It is within a window and It has title bar,
border, close button, minimize button, resizable and movable options.Frame is a part of a
window.
Window: It is an imaginary rectangle area on the monitor.It does not have title bar, border and any
close button.
Window is not a part of window.
Frame:
1.It is a window with title barsand borders.
2.Frame is within a window.
3.It has title bar, border, close button, minimize button, resizable and movable options.
4.Frame is a part of a window.
Window:
1.It is an imaginaryrectangle area on the monitor.
2.Window will not in a frame.
3.It does not have title bar, border and any close button.
4.Window is not a part of window.

Weitere ähnliche Inhalte

Was ist angesagt?

Dot Net Accenture
Dot Net AccentureDot Net Accenture
Dot Net AccentureSri K
 
C# Advanced L07-Design Patterns
C# Advanced L07-Design PatternsC# Advanced L07-Design Patterns
C# Advanced L07-Design PatternsMohammad Shaker
 
Basic Java Programming
Basic Java ProgrammingBasic Java Programming
Basic Java ProgrammingMath-Circle
 
Hibernate introduction
Hibernate introductionHibernate introduction
Hibernate introductionSagar Verma
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_javaHoang Nguyen
 
Object Oriented Programming with Java
Object Oriented Programming with JavaObject Oriented Programming with Java
Object Oriented Programming with Javabackdoor
 
Java Interview Questions
Java Interview QuestionsJava Interview Questions
Java Interview QuestionsKuntal Bhowmick
 
Java interview questions 1
Java interview questions 1Java interview questions 1
Java interview questions 1Sherihan Anver
 
50+ java interview questions
50+ java interview questions50+ java interview questions
50+ java interview questionsSynergisticMedia
 
Java interview-questions-and-answers
Java interview-questions-and-answersJava interview-questions-and-answers
Java interview-questions-and-answersbestonlinetrainers
 
Java interview questions 2
Java interview questions 2Java interview questions 2
Java interview questions 2Sherihan Anver
 
Java Presentation For Syntax
Java Presentation For SyntaxJava Presentation For Syntax
Java Presentation For SyntaxPravinYalameli
 

Was ist angesagt? (18)

Dot Net Accenture
Dot Net AccentureDot Net Accenture
Dot Net Accenture
 
C# Advanced L07-Design Patterns
C# Advanced L07-Design PatternsC# Advanced L07-Design Patterns
C# Advanced L07-Design Patterns
 
Basic Java Programming
Basic Java ProgrammingBasic Java Programming
Basic Java Programming
 
Hibernate introduction
Hibernate introductionHibernate introduction
Hibernate introduction
 
Basics of Java
Basics of JavaBasics of Java
Basics of Java
 
Class 1
Class 1Class 1
Class 1
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_java
 
Object Oriented Programming with Java
Object Oriented Programming with JavaObject Oriented Programming with Java
Object Oriented Programming with Java
 
Java Interview Questions
Java Interview QuestionsJava Interview Questions
Java Interview Questions
 
JAVA PROGRAMMING- Exception handling - Multithreading
JAVA PROGRAMMING- Exception handling - MultithreadingJAVA PROGRAMMING- Exception handling - Multithreading
JAVA PROGRAMMING- Exception handling - Multithreading
 
Class 1 blog
Class 1 blogClass 1 blog
Class 1 blog
 
Java notes
Java notesJava notes
Java notes
 
Java training in delhi
Java training in delhiJava training in delhi
Java training in delhi
 
Java interview questions 1
Java interview questions 1Java interview questions 1
Java interview questions 1
 
50+ java interview questions
50+ java interview questions50+ java interview questions
50+ java interview questions
 
Java interview-questions-and-answers
Java interview-questions-and-answersJava interview-questions-and-answers
Java interview-questions-and-answers
 
Java interview questions 2
Java interview questions 2Java interview questions 2
Java interview questions 2
 
Java Presentation For Syntax
Java Presentation For SyntaxJava Presentation For Syntax
Java Presentation For Syntax
 

Ă„hnlich wie Java interview questions and answers

FAL(2022-23)_CSE0206_ETH_AP2022232000455_Reference_Material_I_16-Aug-2022_Mod...
FAL(2022-23)_CSE0206_ETH_AP2022232000455_Reference_Material_I_16-Aug-2022_Mod...FAL(2022-23)_CSE0206_ETH_AP2022232000455_Reference_Material_I_16-Aug-2022_Mod...
FAL(2022-23)_CSE0206_ETH_AP2022232000455_Reference_Material_I_16-Aug-2022_Mod...AnkurSingh340457
 
Introduction
IntroductionIntroduction
Introductionrichsoden
 
Example Of Import Java
Example Of Import JavaExample Of Import Java
Example Of Import JavaMelody Rios
 
C++ classes tutorials
C++ classes tutorialsC++ classes tutorials
C++ classes tutorialsakreyi
 
Intro Java Rev010
Intro Java Rev010Intro Java Rev010
Intro Java Rev010Rich Helton
 
20 most important java programming interview questions
20 most important java programming interview questions20 most important java programming interview questions
20 most important java programming interview questionsGradeup
 
Java for Mainframers
Java for MainframersJava for Mainframers
Java for MainframersRich Helton
 
JavaScript Miller Columns
JavaScript Miller ColumnsJavaScript Miller Columns
JavaScript Miller ColumnsJonathan Fine
 
Prg421
Prg421Prg421
Prg421john roy
 
Session 02 - Elements of Java Language
Session 02 - Elements of Java LanguageSession 02 - Elements of Java Language
Session 02 - Elements of Java LanguagePawanMM
 
Object-Oriented Programming in Java.pdf
Object-Oriented Programming in Java.pdfObject-Oriented Programming in Java.pdf
Object-Oriented Programming in Java.pdfBharath Choudhary
 
1.introduction to java
1.introduction to java1.introduction to java
1.introduction to javaMadhura Bhalerao
 
Chapter1pp
Chapter1ppChapter1pp
Chapter1ppJ. C.
 
JAVA VIVA QUESTIONS_CODERS LODGE.pdf
JAVA VIVA QUESTIONS_CODERS LODGE.pdfJAVA VIVA QUESTIONS_CODERS LODGE.pdf
JAVA VIVA QUESTIONS_CODERS LODGE.pdfnofakeNews
 

Ă„hnlich wie Java interview questions and answers (20)

FAL(2022-23)_CSE0206_ETH_AP2022232000455_Reference_Material_I_16-Aug-2022_Mod...
FAL(2022-23)_CSE0206_ETH_AP2022232000455_Reference_Material_I_16-Aug-2022_Mod...FAL(2022-23)_CSE0206_ETH_AP2022232000455_Reference_Material_I_16-Aug-2022_Mod...
FAL(2022-23)_CSE0206_ETH_AP2022232000455_Reference_Material_I_16-Aug-2022_Mod...
 
Javanotes
JavanotesJavanotes
Javanotes
 
Introduction
IntroductionIntroduction
Introduction
 
Java
JavaJava
Java
 
Class 1
Class 1Class 1
Class 1
 
Example Of Import Java
Example Of Import JavaExample Of Import Java
Example Of Import Java
 
C++ classes tutorials
C++ classes tutorialsC++ classes tutorials
C++ classes tutorials
 
Intro Java Rev010
Intro Java Rev010Intro Java Rev010
Intro Java Rev010
 
20 most important java programming interview questions
20 most important java programming interview questions20 most important java programming interview questions
20 most important java programming interview questions
 
Java for Mainframers
Java for MainframersJava for Mainframers
Java for Mainframers
 
JavaScript Miller Columns
JavaScript Miller ColumnsJavaScript Miller Columns
JavaScript Miller Columns
 
Prg421
Prg421Prg421
Prg421
 
Session 02 - Elements of Java Language
Session 02 - Elements of Java LanguageSession 02 - Elements of Java Language
Session 02 - Elements of Java Language
 
Object-Oriented Programming in Java.pdf
Object-Oriented Programming in Java.pdfObject-Oriented Programming in Java.pdf
Object-Oriented Programming in Java.pdf
 
Viva file
Viva fileViva file
Viva file
 
1.introduction to java
1.introduction to java1.introduction to java
1.introduction to java
 
Introduction to Core Java Programming
Introduction to Core Java ProgrammingIntroduction to Core Java Programming
Introduction to Core Java Programming
 
Chapter1pp
Chapter1ppChapter1pp
Chapter1pp
 
JAVA VIVA QUESTIONS_CODERS LODGE.pdf
JAVA VIVA QUESTIONS_CODERS LODGE.pdfJAVA VIVA QUESTIONS_CODERS LODGE.pdf
JAVA VIVA QUESTIONS_CODERS LODGE.pdf
 
01slide
01slide01slide
01slide
 

KĂĽrzlich hochgeladen

Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
buds n tech IT solutions
buds n  tech IT                solutionsbuds n  tech IT                solutions
buds n tech IT solutionsmonugehlot87
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 

KĂĽrzlich hochgeladen (20)

Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
buds n tech IT solutions
buds n  tech IT                solutionsbuds n  tech IT                solutions
buds n tech IT solutions
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 

Java interview questions and answers

  • 1. JAVA Interview Questions and Answers: Can a constructor be made final? No, thisis not possible. staticmembersbelong to a class, but the constructor is needed to create an object. An abstract classis a partiallyimplemented class,which containsabstract methods to be implemented in child class. final restrictsmodification: variablesbecome constant, methodscan't be overridden, and classes can't be inherited. No. constructors are similar to methods,but cannot be invoked directlyby a method call. They are used to initialize new class instances.Like methods, theymay be overloaded What is the APK format? The Android packaging key is compressed with classes,UI's, supportive assetsand manifest.All filesare compressed to a single file is called APK. APK standsfor android Application Package File(APK), it is zip file formatted packages based on the android application code. Android application package (APK) is the package file format used by the Android operatingsystem for distribution and installation of mobile appsand middleware. APK filesare analogous to other software packages such as APPXin Microsoft Windows or Deb packages in Debian-based operatingsystemslike Ubuntu. What do you know about Java? Java is a high-level programminglanguage originallydeveloped bySun Microsystems and released in 1995. Java runs on a varietyof platforms, such as Windows, Mac OS, and the various versions of UNIX. Some of the advantagesof the Java: ď‚· The code is compiled into bytecode, it is like code once and run anywhere. It eliminatesthe need for platform-specificversions. ď‚· Unlike other languages,the code is very robust. ď‚· Object-oriented language. ď‚· The appletsrunsfaster ď‚· Compared to C++, Java is easy to learn. Java is an portable language which supportsobject oriented featureslike inheritance,polymorphism and encapsulation and it is platform independent once compile and run any where with the help of JVM.IN JVM we have native stack which is used to store non java code and it helps the programer to covert it to java code.
  • 2. What is stored procedure? 1. Stored procedure is a pre-compiled Sql statements. 2. That meansstored procedure will contain sql statementslike SELECT, UPDATE, DELETE and so on which is alreadycompiled. Syntax: Create procedure procedurename () As Begin { } end A stored procedure is a bunch of SQL statementsthat are stored in the DB. The different types of stored procedures; a) System Stored Procedures b) User Defined Stored Proceduresc) Extended Stored Procedures.These procedureswill accept input parametersso that a single procedure can be called by several clients. The benefits of the Stored Procedures are: - Faster Execution - Implementsmodule programming - Minimize the networktraffic Stored procedure is simplya set operationsperformed on table...with different conditions. what is boolean? Boolean valuesare the two constant objects True and False, are used to represent truth values(other valuescan also be considered false or true). In numericcontexts (for example, when used as the argument to an arithmeticoperator), they behave like the integers0 and 1, respectively. The built-in function bool() can be used to cast any value to a Boolean, if the value can be interpreted as a truth value. This is very basic answer, can some body add more points Boolean or bool consists of operators such as AND, OR, NOT and XOR. Booleans are commonly used in programming to set the result in the value of TRUE or FALSE. I am searching for free JSON API string to build my demo application, any references? I found couple of links, which might be useful for your requirement. - https://www.reddit.com/.json (without CORSrestriction) - http://chancejs.com - http://jsonplaceholder.typicode.com
  • 3. You have to build a backend using php for example. Set specific URI's for specific functionality to handle POST or GET requests.For example for login purposes you can set a url //example.com/login and send your login username and password. On that link your PHP getsthe data, and logs or rejectsto log the user according the the data. Or you can get just information from the database. For example //example.com/getpost/?id=1. From the linkyou php gets the Id, and after fetchingthe data from the database, buldsas a json, and returnsthe data. When should you use Div, Section or Article? Div : Div is a block element. Section: section groups the content related to a single concept / topic, its like a subsection of a major article. Similar to a new paper section, it might have header, body and footer (may be). Article: you can understand it asa complete document, which can be distributable asindependent component. It makes no difference when you are looking from the view of designer!There are all html blocks, which you can change, manage usingcss as you want the same way. It makesmore sense when your are looking on them from the view of SEO. It makesreally much more difference!In articlesSearch engines are looking for articlesfirst, and for articlessearch engines are looking in articlestag. So You deside when to use which one. Sections are more for logical sections, when your tryingto divide your page to logical sections, not usingmany divs which will make your html structure more complicated. They came to help to structure more effective, and easy. public static void main(String []args) in detail thisis we called asmain method.atleast in one place it should exist in a program. here "public" will defines"access modifier", static will define "type of method"by which we need to decide either we need to refer with "classname" r "objectname". void will define "return tye of the method". "(string[ ]args)" will defines "object of args of string class". Java is a pure Object Oriented Language. Anythingyou write in a Java Program should reside in a Class. Assume you have write a simple java program. So you write a Classnamed that containsthe methods which perform your logic. Now to run your logic you have to create an object to your class. So to create an object you should have atleast one method that have access with out creating an object. Hence the main method was declared as "static". Now the Java Virtual Machine(JVM) can call the main method as ClassName.main() public is the access specifier which tells that the main method can be accessed from outside the class.
  • 4. void is the return type of the main method. String[] args is used to pass any arguments. Java only accepts the array of Stringsas arguments. Why Constructor name is same as Class name Constructor is called immediatelyafter an object of a class is created. To reduce the number of keywords in Java, name of the constructor is defined same as the Class name. The Java developersdon't want to include new keyword for constructor. They want to keep it simple and precise. So that it can be unambigouslyidentified asthe constructor. and how its get invoked implicitlywhen we create object of that class. It is invoked by the compiler because it hasalreadybeen unambiguously identified because of itsnamingsheme. What is the difference between a Window and a Frame? The Frame class extends Window to define a main application window that can have a menu bar. Frame: It is a window with title bars and borders.It is within a window and It has title bar, border, close button, minimize button, resizable and movable options.Frame is a part of a window. Window: It is an imaginary rectangle area on the monitor.It does not have title bar, border and any close button. Window is not a part of window. Frame: 1.It is a window with title barsand borders. 2.Frame is within a window. 3.It has title bar, border, close button, minimize button, resizable and movable options. 4.Frame is a part of a window. Window: 1.It is an imaginaryrectangle area on the monitor. 2.Window will not in a frame. 3.It does not have title bar, border and any close button. 4.Window is not a part of window.