/* * Copyright (c) 2014 - present Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ #import "Boxing.h" @implementation Boxing - (NSNumber*)getIntExp { int x = 4; int y = 5; NSNumber *n = [NSNumber numberWithInt: x+y]; return @(x+y); } - (NSNumber*)getInt { NSNumber *n = [NSNumber numberWithInt: 5]; return @5; } - (NSNumber*)getFloat { NSNumber *n = [NSNumber numberWithFloat: 1.5f]; return @1.5f; } - (NSNumber*)getDouble { NSNumber *n = [NSNumber numberWithDouble: 1.5]; return @1.5; } - (NSNumber*)getBool { NSNumber *n = [NSNumber numberWithBool: YES]; return @YES; } - (NSString*)getS{ NSString *s = @(strdup("hello world")) ; return [NSString stringWithUTF8String: "hello world"];; } @end