java - java中调用方法

标签 java methods invoke

我需要编写代码来调用“transferControl”例程并读取收件箱中的信息。我的 java 代码调用“transferControl”方法会怎样?请帮助我,我是java新手

public class WhatNext 
{
// 
// this method is invoked by the business logic to determine the
// NextStep and set it in the receipient's Inbox. There is a suggested
// InBox layout design in this code
//
public static void transferControl ( String requestId,
                                     String businessTransactionId,
                                     String transactionStepId,
                                     String selector,
                                     String requesterId)

{
InStorDB  theDB = new InStorDB();   // "connect" to the DB
    NextStep  next  = theDB.getNextStep(businessTransactionId,
                                        transactionStepId,
                                        selector);
    //
    // these 'columns' provide information on the next step to be taken
    //
    String nextTranId = next.nextBusinessTransactionId;
    String nextStepId = next.nextBusinessStepId;

    //
    // which is then used to obtain the next initiation environment
    //
    CurrentStep current = theDB.getCurrentStep(nextTranId,
                                               nextStepId);
    //
    //  then used to set up the InBox fields of the recepient 
    // "to be coded"


    // 
    // and stored in Inbox database
    // "to be coded"

    }                             
         }

最佳答案

由于方法transferControl是静态的,您可以像下面这样调用方法

WhatNext.transferControl(parameters);

关于java - java中调用方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31911170/

相关文章:

java - JOptionPane.showInputDialog 问题

java - 类路径变量以路径分隔符结尾更好还是没有路径分隔符更好?

java - Java在canvas之外绘制东西,会不会影响性能?

java - 如何在 Spring Boot 应用程序启动时启动 H2 TCP 服务器?

java - 发生某些情况时删除 MouseListener

java - 如何使用任意数量的参数调用 Method.invoke?

ruby - 变量方法调用 - 正确的 Ruby 语法?

python - 传递列表并将其长度设置为python中的默认参数

c# - 未处理时调用 Form 的 Invoke 时出现 ObjectDisposedException

c# - 反射(reflection):如何调用带参数的方法