Martin Luther King believed that a law is just or not based on ethics, any law that enhances character is just, and any law that degrades character is unjust. And an unjust law is a law that is imposed on a minority. For example, apartheid policy is an unjust law
I am fond of telling people that the law is the minimum moral. It does not tell what to do like religion does. The law says that a person cannot do something without being punished. Therefore, the purpose of law is to protect order, and justice is only one of the by-products of the process of maintaining order, but of course there are also other products. Justice is a value judgment that falls under the category of morality and ethics. The law is a definition, something substantial, a contract that everyone must abide by. When we have to make a subjective value judgment about something that exists in substance, there is never a correct version of this judgment, because correctness is also a subjective judgment. So the law itself is not just, but the point of the law is to ensure procedural justice, which can also be understood as a contractual relationship shared by society as a whole – that is, by those you know and those you don’t.
I think the unjust law is the Patriot Act, which violates the protection of civil liberties in the U.S. Constitution. And the just law is the First Amendment, which protects the freedom of speech of citizens.