Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java as a procedural language

 
Ramprasad Bhat
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just like C can simulate OOPs by using the concept of 'struct', can java too have only static methods and private constructors in all classes, pass only primitives and thereby make itself
essentially procedural ?
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes.
 
Rob Spoor
Sheriff
Pie
Posts: 20527
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You won't be able to use String though; you will need to replace it with char[]. You can't use System.out.println() either because that's calling a method of an object. So yes, you can but you will be very, very limited in what you can do.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic