GithubHelp home page GithubHelp logo

cyberster / wipro-training-abstraction-packages-exception-handling---assignments-for-wrapper-classes Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 5.0 7 KB

Hands-on Assignments for Wrapper Class, AutoBoxing, UnBoxing and Cloneable Interface

Java 100.00%

wipro-training-abstraction-packages-exception-handling---assignments-for-wrapper-classes's Introduction

Wipro TalentNext PBL

Topics Covered

Hands-on Assignments for Wrapper Classes Wrapper Class, AutoBoxing, UnBoxing and Cloneable Interface, Wrapper Class

No. Hands-on Assignment Topics Covered Status

1

Write a java program which generates the minimum and maximum value for each of the Numeric Wrapper classes (Byte, Short, nteger, Long, Float, Double)

Sample Output: Integer range: min: -2147483648 max: 2147483647 Double range: min: 4.9E-324 max: 1.7976931348623157E308 Long range: min: -9223372036854775808 max: 9223372036854775807 Short range: min: -32768 max: 32767 Byte range: min: -128 max: 127 Float range: min: 1.4E-45 max: 3.4028235E38

Wrapper Class 	

2

Accept a integer number as Command line argument from the program and when the program is executed print the binary, octal and hexadecimal equivalent of the given number.

Sample Output:

java Test 20 Given Number :20 Binary equivalent :10100 Octal equivalent :24 Hexadecimal equivalent :14

Refer Java Documentation and look for the appropriate Wrapper class method

Wrapper Class 	

3

Define a java class that accepts an integer(between 1 and 255) from the user and displays the String representation of the argument passed as an unsigned integer in base 2. The output displayed should contain 8 digits and should be padded with leading 0s(zeros), in case the returned String contains less than 8 characters.

For example, if the user enters the value 16, then the output should be

00010000

and if the user enters the value 100, the output should be

01100100

You are expected to use Integer class conversion method/s described in the PDF file. Use Scanner class to accept user inputs.(Hint : You may use String.format() method for the expected output)

Wrapper Class 	

4

Create an employee object and initialize its properties. Create a clone of this object and store it in a different object. Now change the properties of the first employee object. Print both the objects and observe the change.

Cloning

wipro-training-abstraction-packages-exception-handling---assignments-for-wrapper-classes's People

Contributors

cyberster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.