Your SQL command is subject to SQL injection and have many other problems:
First thing store the query in a variable and echo it to see what it look like with user data. Debugger can help too.
When data is a string, you need to change the query from
CustomerName="+cntf.getText()+",
to
CustomerName='"+cntf.getText()+"',
The single quotes says to sql that what is in between is not sql.
You need a space before the 'where'
Address="+atf.getText()+"where
Address="+atf.getText()+" where
and quotes around the customer address
Address='"+atf.getText()+"' where
if date is not a number, you have another problem too.
All this just to get you started.
-----
String query="update restaurant set Date="+dtf.getText()+", CustomerID="+iddtf.getText()+", CustomerName="+cntf.getText()+", TotalCost="+ttf.getText()+", PhoneNumber="+pntf.getText()+", Address="+atf.getText()+"where CustomerID="+idtf.getText()+";";
Not necessary a solution to your question, but another problem you have.
Never build an SQL query by concatenating strings. Sooner or later, you will do it with user inputs, and this opens door to a vulnerability named "SQL injection", it is dangerous for your database and error prone.
A single quote in a name and your program crash. If a user input a name like "Brian O'Conner" can crash your app, it is an SQL injection vulnerability, and the crash is the least of the problems, a malicious user input and it is promoted to SQL commands with all credentials.
SQL injection - Wikipedia[
^]
SQL Injection[
^]
SQL Injection Attacks by Example[
^]
PHP: SQL Injection - Manual[
^]
SQL Injection Prevention Cheat Sheet - OWASP[
^]
How can I explain SQL injection without technical jargon? - Information Security Stack Exchange[
^]