UDF code simulation working

 VEERA CODE , 

import java.util.ArrayList;


public class SampleUDFLogic {


    public static void main(String[] args) {

        // Define constant values for the arrays

        String[] D_235 = {"BP", "BP", "BP"};

        String[] D_234 = {"R4", "R4", ""};

        String[] D_98 = {"BT", "VN"};

        String[] D_67 = {"121529", "121528"};


        // Initialize the output list

        ArrayList<String> output = new ArrayList<>();


        // Execute the logic

        udfLogic(D_235, D_234, D_98, D_67, output);


        // Print the output

        System.out.println("Output: " + output);

    }


    public static void udfLogic(String[] D_235, String[] D_234, String[] D_98, String[] D_67, ArrayList<String> output) {

        for (int i = 0; i < D_234.length; i++) {

            if (D_235[i].equals("BP") && !D_234[i].equals("")) {

                output.add(D_234[i]);

            } else {

                // Iterate over D_98 and D_67 arrays

                for (int j = 0; j < D_98.length; j++) {

                    if (D_98[j].equals("VN")) {

                        if (D_67[j].equals("150438")) {

                            output.add("EDI SERVICE ITEM");

                        } else if (D_67[j].equals("121528") || D_67[j].equals("159755")) {

                            output.add("Z-ITEM");

                        }

                    }

                }

            }

        }

    }




}

------------------
https://www.programiz.com/java-programming/online-compiler/


Popular posts from this blog

pss book : శ్రీకృష్ణుడు దేవుడా, భగవంతుడా completed , second review needed. 26th April 2024

pss book: గురు ప్రార్థనామంజరి . completed 21st july 2024

pss book: కధల జ్ఞానము read review pending. 25th june 2024