Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

nashi informatics solutions


{ City } chennai
< Country > india
* Profession *
User No # 125947
Total Questions Posted # 479
Total Answers Posted # 668

Total Answers Posted for My Questions # 836
Total Views for My Questions # 366888

Users Marked my Answers as Correct # 0
Users Marked my Answers as Wrong # 0
Answers / { nashi informatics solutions }

Question { 890 }

. What are the differences between constructor and method of a class in Java?


Answer

Initializing the state of the object is done by constructors. A function Object () { [native code] }, like methods, contains a group of statements (or instructions) that are carried out when an object is created. A method is a group of statements that work together to complete a certain task and return the outcome to the caller. A method has the option of working without returning anything.

Is This Answer Correct ?    0 Yes 0 No

Question { 667 }

How do you use final keywords and final variables in Java?


Answer

Java programmers are unable to alter the value of variables of basic data types when they use final keywords with them.
When final is used with non-primitive variables, the members of the referred object cannot be altered.

Is This Answer Correct ?    0 Yes 0 No


Question { 694 }

In Java, what types of classes perform inheritance?


Answer

• Parent class
• Child class

Is This Answer Correct ?    0 Yes 0 No

Question { 693 }

What types of inheritance does Java support?


Answer

• Single inheritance
• Multilevel inheritance
• Hierarchical inheritance
• Hybrid inheritance

Is This Answer Correct ?    0 Yes 0 No

Question { 632 }

What is Java exception handling?


Answer

In Java, exceptions are objects. When you throw an exception, you throw an object. However, you can’t throw just any object as an exception — only those objects whose classes descend from throwable. Throwable serves as the base class for an entire family of classes, declared in java.lang, that your program can instantiate and throw.

Is This Answer Correct ?    0 Yes 0 No

Question { 866 }

What are the differences between unchecked exception, checked exception, and errors?


Answer

• An Unchecked exception inherits from RuntimeException (which extends from exception). The JVM treats RuntimeException differently as there is no requirement for the application code to deal with them explicitly.
• A checked exception inherits from the exception class. The client code has to handle the checked exceptions either in a try-catch clause or has to be thrown for the super-class to catch the same. A checked exception thrown by a lower class (sub-class) enforces a contract on the invoking class (super-class) to catch or throw it.
• Errors (members of the error family) usually appear for more serious problems, such as OutOfMemoryError (OOM), that may not be so easy to handle.

Is This Answer Correct ?    0 Yes 0 No

Question { 640 }

What are the types of loops in Java, and how are they used?


Answer

• In Java, for loops are used to repeatedly run statements for a specified number of times. When a programmer knows how many times to run a statement, they use a for loop.
•When some statements must run continuously until a condition is met, the while loop can be helpful. Before statements are executed in while loops, the condition is checked.
•With the exception of checking the condition after a block of statements has been executed, the do while loop is identical to the while loop. Do while loop statements should also run at least once.

Is This Answer Correct ?    0 Yes 0 No

Question { 741 }

How do you declare an infinite loop?


Answer

for (;;)
{
// Statements to execute
// Add any loop breaking logic
}

Is This Answer Correct ?    0 Yes 0 No

Question { 702 }

What is the difference between the continue and break statement?


Answer

Two crucial words that are utilized in loops are break and continue. When a loop has a break keyword, the loop ends immediately. When the continue keyword is used, the current iteration ends and the loop moves on to the following iteration.

Is This Answer Correct ?    0 Yes 0 No

Question { 715 }

What is the entry point in Java, and how is it written?


Answer

• The main function in Java serves as the program's entry point.
• public static void main string args is how main() is always written.

Is This Answer Correct ?    0 Yes 0 No

Question { 701 }

In Java, what are public static void main string args?


Answer

The access modifier "public" is used to define who has access to this method. Any class can use this method as well.
• The Java keyword "static" indicates when something is class-based. Java makes main() static so that it can be accessed without requiring the creation of a class instance. Since the JVM calls main() before creating any objects, the compiler will raise an error if main is not set to static. It can only use the class to directly call static methods.
• The method that defines the method's return type is called Void. There is no value returned by that procedure.

• Main is the name of the method that the JVM looks for when an application (with a certain signature only) starts. It is

Is This Answer Correct ?    0 Yes 0 No

Question { 723 }

In Java, what’s the purpose of static methods and static variables?


Answer

When a method or variable needs to be shared across several objects of a class, developers utilize a static keyword to make it shared for all objects. Instead of making unique copies for every object, this is employed.

Is This Answer Correct ?    0 Yes 0 No

Question { 761 }

How do you use, call, and access a static method in Java?


Answer

• The static keyword needs to appear before the method name.
• Use the class (className.methodName) to invoke a static method.
• No non-static instance variables or methods can be accessed by static methods.

Is This Answer Correct ?    0 Yes 0 No

Question { 697 }

How do you use, call, and access a non-static method in Java?


Answer

• The static keyword does not have to appear before the method name.
Like any generic method, call a non-static method.
• Any static variable or method can be accessed by non-static methods without requiring the creation of a class instance.

Is This Answer Correct ?    0 Yes 0 No

Question { 664 }

In Java, what are this() and super(), and where are you required to use them?


Answer

Super() and this() are special keywords in Java that are used to invoke the constructor. This() and super() must appear as the block's initial line.

Is This Answer Correct ?    0 Yes 0 No

Prev    1   ... 4   ... 7   ... 10   ... 13   ... 16   ... 19    22   [23]    24  ... 28   ... 31   ... 34   ... 37   ... 40   ... 43    Next