পৃষ্ঠাসমূহ

Search Your Article

CS

 

Welcome to GoogleDG – your one-stop destination for free learning resources, guides, and digital tools.

At GoogleDG, we believe that knowledge should be accessible to everyone. Our mission is to provide readers with valuable ebooks, tutorials, and tech-related content that makes learning easier, faster, and more enjoyable.

What We Offer:

  • 📘 Free & Helpful Ebooks – covering education, technology, self-development, and more.

  • 💻 Step-by-Step Tutorials – practical guides on digital tools, apps, and software.

  • 🌐 Tech Updates & Tips – simplified information to keep you informed in the fast-changing digital world.

  • 🎯 Learning Support – resources designed to support students, professionals, and lifelong learners.

    Latest world News 

     

Our Vision

To create a digital knowledge hub where anyone, from beginners to advanced learners, can find trustworthy resources and grow their skills.

Why Choose Us?

✔ Simple explanations of complex topics
✔ 100% free access to resources
✔ Regularly updated content
✔ A community that values knowledge sharing

We are continuously working to expand our content library and provide readers with the most useful and relevant digital learning materials.

📩 If you’d like to connect, share feedback, or suggest topics, feel free to reach us through the Contact page.

Pageviews

Wednesday, January 18, 2017

Java.lang.Short Class

Introduction

The java.lang.Short class wraps a value of primitive type short in an object. An object of type Short contains a single field whose type is short.

Class declaration

Following is the declaration for java.lang.Short class:
public final class Short
  extends Number
     implements Comparable<Short>

Field

Following are the fields for java.lang.Short class:
  • static short MAX_VALUE -- This is the constant holding the maximum value a short can have, 215-1.
  • static short MIN_VALUE -- This is the constant holding the minimum value a short can have, -215.
  • static int SIZE -- This is the number of bits used to represent a short value in two's complement binary form.
  • static Class<Short> TYPE -- This is the Class instance representing the primitive type short.

Class constructors

S.N. Constructor & Description
1 Short(short value)
This constructs a newly allocated Short object that represents the specified short value.
2 Short(String s)
This constructs a newly allocated Short object that represents the short value indicated by the String parameter.

Class methods

S.N. Method & Description
1 byte byteValue()
This method returns the value of this Short as a byte.
2 int compareTo(Short anotherShort)
This method compares two Short objects numerically.
3 static Short decode(String nm)
This method decodes a String into a Short.
4 double doubleValue()
This method returns the value of this Short as a double.
5 boolean equals(Object obj)
This method compares this object to the specified object.
6 float floatValue()
This method returns the value of this Short as a float.
7 int hashCode()
This method returns a hash code for this Short.
8 int intValue()
This method returns the value of this Short as an int.
9 long longValue()
This method returns the value of this Short as a long.
10 static short parseShort(String s)
This method parses the string argument as a signed decimal short.
11 static short parseShort(String s, int radix)
This method parses the string argument as a signed short in the radix specified by the second argument.
12 static short reverseBytes(short i)
This method returns the value obtained by reversing the order of the bytes in the two's complement representation of the specified short value.
13 short shortValue()
This method returns the value of this Short as a short.
14 String toString()
This method returns a String object representing this Short's value.
15 static String toString(short s)
This method returns a new String object representing the specified short.
16 static Short valueOf(short s)
This method returns a Short instance representing the specified short value.
17 static Short valueOf(String s)
This method returns a Short instance representing the specified short value.
18 static Short valueOf(String s, int radix)
This method returns a Short object holding the value extracted from the specified String when parsed with the radix given by the second argument.

Methods inherited

This class inherits methods from the following classes:
  • java.lang.Object

No comments:

Post a Comment