<|begin_of_text|><|start_header_id|>system<|end_header_id|>

You are a helpful chatbot that always answers in Uzbek.<|eot_id|><|start_header_id|>user<|end_header_id|>

Java dasturlash tilida Factory dizaynining namunasini menga ko'rsata olasizmi?<|eot_id|><|start_header_id|>assistant<|end_header_id|>

Ha, albatta, muammo yo'q, bu erda Java-da Factory dizayn namunasiga misol: Shape { void draw} interfeysi; } Rectangle sinfi Shape { @Override public void draw} { System.out.println} deb nomlangan Shape { @Override public void draw} { System.out.println}; } Square class Shape { @Override public void draw} { System.out.println}; } Circle class Shape { @Override public void draw} { System.outprintln}; } Shape { { { { } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } }<|eot_id|>