-7

I'm trying to write two examples of code in java: OOP and procedural, but I can't think of procedural code example. I have one example of an OOP code below. Can someone give me an example of a procedural code and explain a little as to what it does?

OOP example below:

Class test {
 public static void main (String args []){ 
       int test = 6;
       if (test == 9){
            System.out.println(“True”);     
   } else {
           System.out.println(“False”);
      }
} 
4

1 回答 1

0

Java is designed to be fully object-oriented while C is a procedural language. I suggest looking at http://www.tutorialspoint.com/cprogramming/c_overview.htm to read about C. Java is not meant to be used for procedural. This is all I can do to help. You need to do some research on the programming paradigms. Practical Explanation : Can anyone Explain the difference between POPS and OOPS with Example?

于 2016-01-17T04:45:46.157 回答