Archive for the ‘SCJP 5/6’ category

What is the round() method?

October 30th, 2009

The round() method is a static method of the java.lang.Math class. It takes a floating-point number as an argument and returns an integer representation of the number. The value returned by the round() method is the same as the value returned by the Math.floor() method in the following conditions:

  • Share/Bookmark

Modifiers

October 29th, 2009

Modifiers are Java keywords that are used to declare features in applications. They affect either the lifetime or the accessibility of a feature. A feature may be a class, a method, or a variable.

  • Share/Bookmark

A Closer Look at Methods

October 29th, 2009

A method is a set of statements grouped together to perform a specific task. It is written to define the behavior of an object or a class. In object-oriented programming, a behavior is referred to as a message that one object sends to another object. Behavior is the only way by which an object can do anything.

  • Share/Bookmark

Things to practice for Sun test CX310-055.

October 27th, 2009

The CX310-055 (Sun Certified Programmer for the Java 2 Platform, Standard Edition 5.0) checks your real ability as a programmer. In fact it is totally scenario based, rather than knowledge based. This test requires you to have a good understanding of the Java language and the capability to write code for well-defined design applications. For this purpose, along with studying books and taking various practice tests, you should also practice with Java. There will be less number of direct questions, and more questions will be ‘find the output’ type. Besides, Drag-n-Drop questions have been added. A good number of questions will be based on new topics added to the language, i.e., on generics, autoboxing/unboxing, covariant return, variable length arguments, static import, enums and for-each loop. Although, not many direct questions will be there in the test, but practicing them will help clear your fundamentals. Practicing the following things with Java will make you confident enough to score well in the test:

  • Share/Bookmark

String, StringBuffer and StringBuilder classes

October 26th, 2009

String, StringBuffer, and StringBuilder are classes present in the Object class. String objects are immutable, whereas StringBuffer and StringBuilder objects can be modified.

String Class

  • Share/Bookmark

What is a static initializer block?

October 4th, 2009

A static initializer block is a free hanging block in a Java class. It is used mainly for initialization. It is very similar to a constructor, but it cannot be inherited. The static initializer block is declared as follows:

static
{
     int i = 5;
      //more static initializations
}

This block has neither any return type nor any access modifier. This is why it is known as a free hanging static initializer block. Unlike a constructor, a static initializer block is executed only once, at the time of class loading.

  • Share/Bookmark

What is the ClassCastException?

October 4th, 2009

The ClassCastException is thrown to show an invalid cast. It indicates that the code has attempted to cast an object to a subclass of which it is not an instance. It is also thrown when an attempt is made to add an incompatible object to a collection.

  • Share/Bookmark

Skills required for Sun test CX310-056

October 4th, 2009

Sun has specified more than twenty-five objectives for Sun test CX310-056 (Sun Certified Programmer for the Java 2 Platform, Standard Edition 5.0 Upgrade Exam), which are grouped under seven topics. Before taking the test, an individual should possess good command over the following areas:

  • Share/Bookmark

What is an IllegalStateException?

October 4th, 2009

An IllegalStateException is a kind of runtime exception. It is used to indicate that a method has been invoked on an object that is not in an appropriate state to perform the requested operation. This means that the method has been invoked at an inappropriate time.

  • Share/Bookmark

What is an IllegalArgumentException?

October 3rd, 2009

An IllegalArgumentException extends from RuntimeException to indicate that a method has been passed an illegal or inappropriate argument. There are two kinds of constructors for IllegalArgumentException as follows:

  • public IllegalArgumentException( )
    It constructs an IllegalArgumentException without any detailed message.
  • public IllegalArgumentException(String str)
    It constructs an IllegalArgumentException with the specified detailed message.
  • Share/Bookmark
uCertify.com | Our Company | Articles | Contact Us | News and Press Release | uCertify India | Entries (RSS)
MCSE: MCSA, MCTS, MCITP    JAVA Certification: SCJP, SCWCD    Cisco Certification: CCNA, CCENT    A+, Network+, Security+ Project+
Oracle Certification: OCP 11g, OCP 10g, OCA 11g, OCA 10g    CIW foundation    EC-212-32,    CISSP    Photoshop ACE CS4    Adobe Flash ACE, PMP, CAPM
© 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.