THE DEPRESSED
TEEN
ASSESSMENT 2 (10%)
Theme: Mental health
(Depression)
, GROUP 2 MEMBERS
LOGESVARAN A/L SUBRAMANIAM S.RISHIP PRASATH A/L NURALIA ALISA BINTI ADAM
2210778 SHANMUGANATHAN 2211084
2210771
Java Interview Questions And Answers | Java Programming Interview Questions And Answers |Simplilearn Simplilearn Java is one of the most sought programming languages in the current id industry. Multiple multi-million dollar companies which are using java till today. This video is dedicated to help out the java developers and the beginners in java programming language to crack the most frequently asked java interview questions. The answer for this question is neither the local variables or the global variables or any primitives or any object references do not have any kind of default value stored in them. If you just declare int i as int i then the value stored inside that i variable will be a garbage value so similarly when you declare some kind of local variable in java then what will be the default value inside it. Copy constructor in java is a constructor that initializes an object through another object of the same class. Java provides a built-in function or method that is the clone method to clone an existing object offering the same functionality that of the original object. Java still makes use of eight or more primitive data types which are end flow double and few others. The answer for this question is in java when you declare primitive data types that is the endfloat double etc then the wrapper classes are responsible for converting them into objects or reference types. The use of packages helps in code reusability so basically when you create a specific package inside that package you will store all the class files that you will be using in your java program so using a package is basically a good practice. Java 's major motive was to keep programming simple so accessing memory directly through pointers is not a recommended action so the answer is a big no you can not implement pointers in java program so followed by that we have our next question differentiate between instance and local variables. The answer for this question is really simple instance variables are declared inside a class and the scope is limited to only a specific object. final is a predefined word in java that is used while declaring values to variables when a value is declared using the final keyword then that particular value of that particular variable will remain constant throughout the execution of program. The answer for this question is when the main method is not declared a static then the program may be compiled perfectly but ends up with a serious ambiguity and throws a runtime error that says no such method error. The answer for this question is as follows yes a constructor can written a value it basically returns the current instance of a class implicitly. The process of creating multiple method signatures using one method name is called as method overloading so for example consider that you wanted to include an addition operation in your program that performs addition operation so the first method will be having the name add. The process of method overloading can be achieved by using two different ways the first way is to change the number of arguments. The second way is varying the written type of the method so with this let 's enter into the next question can we overload a static method? The answer is no java does not support overloading of static method. Delete function or any kind of manipulation function is faster in linked list compared to array. The answer for this question is why are generics used in java so compile time type safety is provided by using generics in java. The life cycle of an applet basically involves the following stages the first stage is the initialization stage.
Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.
No worries! You can instantly pick a different document that better fits what you're looking for.
No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.
“Bought, downloaded, and aced it. It really can be that simple.”