1. Trang chủ
  2. » Công Nghệ Thông Tin

Tài liệu Chapter 3 Quick Reference ppt

1 286 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Chapter 3 Quick Reference
Trường học Standard University
Chuyên ngành Computer Science
Thể loại Tài liệu
Năm xuất bản 2023
Thành phố Hanoi
Định dạng
Số trang 1
Dung lượng 6,77 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

For example: int addValuesint leftHandSide, int rightHandSide { .... For example: return leftHandSide + rightHandSide; Return from a method before the end of the method Write a return s

Trang 1

Chapter 3 Quick Reference

Declare a method

Write the method inside a class For example:

int addValues(int leftHandSide, int rightHandSide) {

} Return a value from inside a

method

Write a return statement inside the method For example: return leftHandSide + rightHandSide;

Return from a method before

the end of the method

Write a return statement inside the method For example: return;

Call a method

Write the name of the method, together with any arguments between parentheses For example:

addValues(39, 3);

Use the Generate Method Stub

Wizard

Highlight a call to the method, and then click Generate Method Stub on the IntelliSense menu

Debug

Step into a method

On the Debug toolbar, click Step Into

or

On the Debug menu, click Step Into

Step out of a method

On the Debug toolbar, click Step Out

or

On the Debug menu, click Step Out

Ngày đăng: 21/01/2014, 15:20

TỪ KHÓA LIÊN QUAN